我今天感觉特别无知。为什么我不能获得下面的代码来正确地将扩展数据连接到该行? 
  
			
			-  
-  (while (setq PT1 (getpoint "\nPick the leader endpoint: "))
-    (setq PT2 (getpoint PT1 "\nPick the tag center point: "))
-    (setq DS (getvar "dimscale"))
-    (setq ANG (angle PT2 PT1))
-    (setq DIST (distance PT1 PT2))
-    (setq LDRPT (polar PT2 ANG RAD))
-    (command "line" PT1 LDRPT "")
-    (setq LnEnt (entget(entlast)))
-    (setq LnHndl (cdr (assoc 5 LnEnt)))
-    (command "INSERT" "BALLOON" PT2 DS DS 0 TAGNUM)
-    (setq BlnEnt (entget(entlast)))
-    (setq BlnHndl (cdr (assoc 5 BlnEnt)))
-    ;add entity handles to other entity
-    (regapp "GP_Balloon")
-    (princ "\n1")
-    (setq exdata '((-3 ("GP_Balloon" (1005 . eval(LnHndl))))))
-    (princ "\n2")
-    (setq newent (append BlnEnt exdata))
-    (princ "\n3")
-    (entmod newent)
-    (princ "\n4")
-    
-    (setq TAGNUM (1+ TAGNUM))
-  )
-  (redraw)
                          
  
 
我添加了(princ“#”)行作为故障分析的指针。我得到1、2和3。看看它,我认为我的问题是(setq exdata…行)。
  
任何帮助都将不胜感激。  |