Author Topic: ENTMOD not working on annotative Leader ?  (Read 1390 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
ENTMOD not working on annotative Leader ?
« 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.


Code: [Select]
(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.
Keep smile...

Andrea

  • Water Moccasin
  • Posts: 2372
Re: ENTMOD not working on annotative Leader ?
« Reply #1 on: August 19, 2009, 01:18:15 PM »
i've found another way...
but I still not understand why EntMod still not working..

code:
Code: [Select]
(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
                       )
                     )
)

Keep smile...

curmudgeon

  • Newt
  • Posts: 192
Re: ENTMOD not working on annotative Leader ?
« Reply #2 on: August 19, 2009, 03:08:01 PM »
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.
Never express yourself more clearly than you are able to think.

Andrea

  • Water Moccasin
  • Posts: 2372
Re: ENTMOD not working on annotative Leader ?
« Reply #3 on: August 20, 2009, 10:11:54 AM »
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. ;-)
Code: [Select]
;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.  ;-)
Keep smile...