acad.lsp文件
我想知道acad.lsp文件存在哪,我在C:\Documents and Settings\Administrator\Application Data\Autodesk\AutoCAD 2009\R17.2\chs\Support找了好久都没有.请大虾指教!谢谢 你为什么要找这个东西?本来就没有,你去哪里找? 如何将图中所有的STANDADN样式的标注文字改为SIMPLEX样式?可在ACAD.LSP中加一句:(vl-cmdf ".style" "standadn" "simplex.shx")。
这是一道题目 我不是很理解 请斑竹指教 既然没有你可以自己建立一个试试
回复 #4 cad 的帖子
HEHE,就是呀.ACAD.lsp并没有的,只是你如果有什么二次程序要自动加载,那就要写一个ACAD.LSP了,其实所谓写,也无外乎一个load命令.同时要放在你的CAD的程序SUPPORT目录内. 谢谢 我会慢慢去学:lol 我的有acad.lsp但怎么没人说的有这个LSP该如何书写格式是怎么样的比如
(defun c:cced(/ f fn ff e0 dwg a i)
(command"sh""deldxf")
(initget(+ 2 4))(princ"\n ")
(setq dwg(getvar"DWGNAME"))
(setq a(strlen dwg)i a)
(while(> i 0)
(if(= (substr dwg i 1)"\\")(setq dwg(substr dwg(+ i 1)(+ (- a i)1))i 1))
(setq i(- i 1))
)
(while a
(setq e0(strcat"\n请输入线切割文件名,不支持长文件名:<"">"))
(setq fn(getstring e0))
(if(= fn "")(setq fn dwg))
(setq f(strcat "c:/wc/"fn".dxf"))
(setq ff(open f"r"))
(cond((/= ff nil)
(princ"\n")(princ" 有同名文件")(princ" 要覆盖它吗?")
(princ"确认按空格:")
(setq a(getint" "))
(close ff)
)
((= ff nil)(setq a nil))
)
)
(redraw)(princ"\n ")(princ"\n ")
(princ "\n选切割曲线,目标不能为多义线或样条曲线,如为多义线请炸开,样条曲线请转换成弧或直线:")
(setq s1(ssget))
(setq laa"ok")
(setq cla(getvar"CLAYER"))
(if(/= laa cla)(command "layer""NEW"LAA"off"laa""))
(command "CHprop"s1"""la"laa"")
(cond((/= laa cla)
(command "layer""NEW"LAA"off"laa"")
(command "layer""ON"LAA"s"laa"off"cla"")
)
)
(setq e0(getpoint"\n起点: "))
(princ"\n稍候...")(princ"\n ")
(setq ff(strcat fn".STP"))
(setq f"c:/wc/"f(strcat f ff))
(setq f(open f"w"))
(princ(car e0)f)(princ"\n"f)
(princ(nth 1 e0)f)(princ"\n"f)
(close f)
(setq f"c:/wc/"f(strcat f fn))
(command"dxfout"f 8)(princ"\n ")(princ"\n ")
(setq ff(open "c:/wc/zanechen.fn""w"))
(princ fn ff)(princ"\n"ff)(close ff)
(command"sh""dv""REDRAW")
(command "CHprop"s1"""la"cla"")
(if(/= laa cla)(command "layer""ON"cla"s"cla"off"laa""))
)
这代表的是什么意思希望指点下
页:
[1]