- 积分
- 8801
- 明经币
- 个
- 注册时间
- 2003-7-14
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
;|
1 (deg->rad angle): input angle in degrees as a real or int, returns angle in radians as real eg (setq a (deg->rad 180)) = 3.14
2 (rad->deg angle): input angle in radians as a real or int, returns angle in degrees as real eg (setq a (rad->deg (/ pi 2.0))) = 90
3 (tan angle): input angle in radians, returns tangent of angle as real eg (setq a (tan (/ pi 4))) = 1.0
4 (asin real): input real, returns arcsine of number in radians eg (setq a (asin 0.5)) = 0.523
5 (acos real): input real, returns arcosine of number in radians eg (setq a (acos 0.5)) = 10.0472
nine general AutoCAD functions :
6 (3d->2d 3d point) returns a 2d point eg (setq a (3d->2d '(0 0 0))) = (0 0)
7 (2d->3d 2d point level) returns a 3d point with z value equal to level or 0.0 if nil eg (setq a (2d->3d '(0 0) 0)) = (0 0 0)
8 (stringp val): input a value, returns true if value is a string else nil eg (stringp "Hello") = true
9 (intp atom): returns T if atom is an integer eg (intp 1) = true
10 (realp atom): returns T if atom is a real number eg (realp 1.0) = true
11 (c:lbo): changes layer of select object to objects colour
12 (c:ca): like the align command but copies the object(s)
13 (c:blktxt): converts text representing a number into a block
Nine list manipulation tools :
14 (vl-remove-last list): input list, removes last element from list eg (setq a (vl-remove-last '(1 2 3))) = (1 2)
15 (strl_sort list): input list of strings, similar to (acad_strlsort) but sorts numbers numerically eg (strl_sort '("b" "a" "10" "1")) = ("1" "10" "a" "b")
16 (remove atom list): similar to (vl-remove) but only removes first occurance of atom in list eg (remove 1 '(1 1 2 1)) = (1 2 1)
17 (nth-remove nth list): removes nth element from list eg (nth-remove (0 '(1 2 3))) = (2 3)
18 (vl-add atom nth list): adds atom as nth element of list eg (vl-add 2 1 '(3 3)) = (3 2 3)
19 (sublist start length list): returns a number of elements after start position from a list eg (sublist 1 2 '(1 2 3 4 5)) = (2 3)
20 (remlist start length list): removes a number of elements after start position from a list eg (remlist 1 2 '(1 2 3 4 5)) = (1 4 5)
21 (list->string delim list): input deliminator as string, list, converts elements of list to a deliminated string eg (list->string "*" '("1" "2")) = "1*2"
22 (strconv list): converts elements of list into strings eg (strconv '(1 2.5 "h")) = ("1" "2.5" "h")
Eleven String functions :
23 (ltrim string): input string, removes any spaces from the beginning of the string eg (ltrim " trim ") = "trim "
24 (rtrim string): input string, removes any spaces from the end of the string eg (rtrim " trim ") = " trim"
25 (trim string): input string, removes spaces from beginning and end of string eg (trim " trim ") = "trim"
26 (string->list string): input string, returns the string a list using spaces a delimineater eg (string->list "Hello World") = ("Hello" "World")
27 (mid string string): input two strings, returns first string if it is found within second string else nil eg (mid "to" "AutoCAD") = "to"
28 (replace oldstring newstring string): replaces occurrences of oldstring in string with newstring eg (replace "\t" " " "Line one\tLine two") = "Line one Line two"
29 (stringtype string): returns data type of contents of the string eg (strtype "1.5") = "REAL"
30 (right string int): returns number of characters from right of string eg (right "AutoCAD" 3) = "CAD"
31 (left string int): returns number of characters from left of string eg (left "Hello" 4) = "Hell"
32 (multiline string int): returns string as a list of strings, each element being no longer than int but finishing with a full word if possible eg (multiline "Hello New World" 3) = ("Hel" "lo " "Wor" "ld")
33 (stringcase string int): changes string case 0 or nil Upper Case, 1 Lower Case, 2 Initail Character Upper Case rest Lower eg (stringcase "hello world" 2) = "Hello World"
Two Selection Set Functions :
34 (sslist pickset): input selectionsel, returns list of selected entities eg (sslist (ssget)) = (<Entity name: 40061d70> <Entity name: 40061d68>)
35 (foreachss string quoted function): iterates through entities in a selection set eg (foreachss "i" (ssget) '(entdel i)) - this will delete all of the selected entities |;
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
x
|