TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Andrea on August 19, 2009, 12:07:04 PM
-
Hi all..
I've made many tests...
but i'm stucked on that...
this code below work for NONannotative Leader Only.
(setq lleadprop (entget(car(entsel "\nSelect LEADER object..."))))
(setq NP (getpoint "\nselect New Point..."))
(setq lleadprop (subst (cons 10 NP) (assoc 10 lleadprop) lleadprop))
(entmod lleadprop)
any hint ?
(tested with 2008, 2009 and 2010)
Thanks.
-
i've found another way...
but I still not understand why EntMod still not working..
code:
(setq lleadprop (entget
(setq item (car (entsel "\nSelect LEADER object...")))
)
)
(setq np (getpoint "\nselect New Point..."))
(setq vlallead (vlax-ename->vla-object item))
(setq pointlist (vlax-safearray->list
(vlax-variant-value (vla-get-coordinates vlallead))
)
)
(setq vlallead (vlax-ename->vla-object item))
(setq nl (subst (car np) (car pointlist) pointlist))
(setq nl (subst (cadr np) (cadr nl) nl))
(vla-put-coordinates vlallead
(vlax-make-variant
(vlax-safearray-fill (vlax-make-safearray vlax-vbdouble
(cons 0 (1- (length nl)))
)
nl
)
)
)
-
I have used my own leader routine for years, and my arrow is all one single lwpolyline. not familiar with the dxf returned by your first call, but I have had times when entmod appeared to fail and I needed to entupd before it would actually change.
but I can't remember the specifics of when I had to do that - I found another way too.
-
I have used my own leader routine for years, and my arrow is all one single lwpolyline. not familiar with the dxf returned by your first call, but I have had times when entmod appeared to fail and I needed to entupd before it would actually change.
but I can't remember the specifics of when I had to do that - I found another way too.
Hi, thanks.
I also have create similar program in 1991 who use textsize so set arrow dimension. ;-)
;FLECHE COURBE Novembre 1991
;par ANDREA ANDREETTI
(defun C:LEADARC (/ pt1 col clt pt2 len len1 pangle)
(graphscr)
(setq pt1 (getpoint "Start: ")
col (getvar "cecolor")
clt (getvar "celtype")
pt2 (getpoint pt1 " ")
len (getvar "textsize")
len1 (/ (getvar "textsize") 3)
pangle (angle pt1 pt2)
)
(command "_celtype" "continuous" "_cecolor" "4" "_pline" pt1 "_w" "0" len1 (polar pt1 pangle len ) "_W" "0" "" "_a")
(setvar "cecolor" col)(princ)(setvar "celtype" clt)(princ)
)
for the entupd function....it still not modify the leader..but it's not matter anymore..
I've update the DiLeader. ;-)