Vincenzo_O
Guest
Bye to all,
I am a neophyte of the lisp so take patience.
I am trying to run a routine that selects a dynamic block placed at a specific point of paper space and immects the current value of the block in a variable.
below the code that I modified starting from that of lee mac. does not work and I do not understand why.
every help is well accepted, thank you.
(defun lm:getdynpropvalue (blk prp )
(setq prp (strcase prp)
(vl-some '(lambda ( x ) (if (= prp (strcase (vla-get-propertyname x)))) (vlax-get x 'value)))
(vlax-invoke blk 'getdynamicblockproperties)
)
)
(defun c:02test ( / and x )
(setq ppp (getpoint "\n\tpick higher left corner\t [bleep]: ")
(setq x (nth 0 ppp)
(setq y (nth 1 ppp)
(setq x1 (+ x 20.72))
(setq y1 (- y 9.37)
(setq x2 (+ x 3.3))
(setq y2 (- y 7.85)
(if (and (setq and (ssget "_w" (list x1 y1))
(= "insert" (cdr (assoc 0)))
)
(print (setq x (lm:getdynpropvalue)
)
(princ)
)
I am a neophyte of the lisp so take patience.
I am trying to run a routine that selects a dynamic block placed at a specific point of paper space and immects the current value of the block in a variable.
below the code that I modified starting from that of lee mac. does not work and I do not understand why.
every help is well accepted, thank you.
(defun lm:getdynpropvalue (blk prp )
(setq prp (strcase prp)
(vl-some '(lambda ( x ) (if (= prp (strcase (vla-get-propertyname x)))) (vlax-get x 'value)))
(vlax-invoke blk 'getdynamicblockproperties)
)
)
(defun c:02test ( / and x )
(setq ppp (getpoint "\n\tpick higher left corner\t [bleep]: ")
(setq x (nth 0 ppp)
(setq y (nth 1 ppp)
(setq x1 (+ x 20.72))
(setq y1 (- y 9.37)
(setq x2 (+ x 3.3))
(setq y2 (- y 7.85)
(if (and (setq and (ssget "_w" (list x1 y1))
(= "insert" (cdr (assoc 0)))
)
(print (setq x (lm:getdynpropvalue)
)
(princ)
)