我需要一些帮助来解决lisp例程的问题。cad2009早期版本中的常规工作在2013年将不起作用。
在拾取多段线后,我试图用平方英尺的面积替换文字值。我只能用平方英寸替换文字。
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri];;;CADDMAN: Area7.LSP Area Output (c) 2007 Kirby Turner [/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri](defun c:area7 (/ a1)[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri](SETQ A1 (ENTSEL "Area of tract<pickobject>: "))[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri](command "area" "e" a1)[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri](setq el (getvar "area"))[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri](setq d1 144)[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri] (setqfl (rtos (el 2 2))[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri] (setqe1 ( / f1 d1)[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri] ;;;(rtos(/ e1 144.0) 2 3)[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri];;;(rtos (/ e1 144.0) 2 3)[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri] (SETQED(ENTGET (CAR (NENTSEL "\nPick TEXT to change:"))))[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri] (setvar"CMDECHO" 0)[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri] (COMMAND"TEXTEVAL" 1)[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri] (SETQ ED(SUBST (cons 1 e1)[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri] (ASSOC 1 ED)[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri] ED[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri] )[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri])[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri](ENTMOD ED)[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri])[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri](alert[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri] (strcat"area7.LSP"[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri] "\n\n Type area7 to start"))[/font]
- [font=Times New Roman][size=3][/size][/font]
- [font=Calibri](princ)[/font]
- [font=Times New Roman][size=3]
- [/size][/font]
|