大家好,
我尝试向选定多段线的长度中添加一个数字,并将其粘贴到属性中。
我试图改变这一习惯,但我做不到
你能帮帮我吗
- (vl-load-com)
- (defun c:ALE (/ atent attobj ent leng obj mou tot)
- (while
- (setq ent
- (entsel "\nSelect Polyline (or press eEnter to Exit): "))
- (setq obj (vlax-ename->vla-object (car ent)))
- (setq mou (getreal "\nEnter the extra length : "))
- (setq leng (rtos
- (vlax-get-property obj "Length")
- 2
- 0 ; <--precison 1 decimals
- )
- )
- (if
- (setq atent
- (nentsel "\nSelect Attribute: "))
- (progn
- (setq tot '(+ leng mou))) ; problem with this
- (setq attobj (vlax-ename->vla-object (car atent)))
- (vlax-put-property attobj "TextString" tot)
- )
- )
- )
- (princ)
- )
- (prompt "\nStart command with ALE")
- (prin1)
|