PDA

View Full Version : Help to Get X scale Value of a Dynamic Block


vferrara
2008-03-13, 10:02 PM
Hello AUGI Members,

I am using the following piece of code to get the dynamic properties of specific DB's via a lisp routine.

;;;;CODE START
;;;;
(defun SUl (/ adoc atts axss ss val)
(vl-load-com)
(setq adoc
(vla-get-activedocument
(vlax-get-acad-object)
)
)
(vla-endundomark adoc)
(vla-startundomark adoc)
(vla-get-application adoc)

(If (setq ss (ssget "_X" (list (cons 0 "INSERT") (cons 8 "S-stl-bms,S-stl-bms-d,S-stl-trus,S-stl-jst,S-e-stl-bms,S-stl-lintel,S-stl-brac e,S-stl-brace-d") )))

(progn (setq axss (vla-get-activeselectionset adoc))
(vlax-for a axss
(progn
(Setq Bml (getdynprop a "Distance"))
(Setq Ban (getdynprop a "Angle"))

;;;;
;;;;CODE END

I would like to get the Scale X of the DB using this code but I am stumped. The reason I want to get the Scale X is to determine if the DB is mirrored in which case the Scale X would be -96 as an example.

Any assistance would be appreciated...!

Best Regards,
Vince

Moderator Note:
Please use [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code)

aaronic_abacus
2008-03-13, 10:38 PM
Assoc 41, 42, and 43 are the dxf codes for xyz scales

View the list with
(entget(car(entsel)))

vferrara
2008-03-14, 12:27 PM
Thank you for your response.....!

However, when I try to use the (entget(car(entsel))) code within the example lisp routine I get an error. Can I impose upon you to give me an example of how to integrate this into the code....?? that would be very helpful....!

Thank you again for your assistance.

Regards,
Vince

vferrara
2008-03-17, 04:31 PM
I tried to insert your suggested piece of code but I get an error when the routine tries to run.....!


(defun SUl (/ adoc atts axss ss val)
(vl-load-com)
(setq adoc
(vla-get-activedocument
(vlax-get-acad-object)
)
)
(vla-endundomark adoc)
(vla-startundomark adoc)
(vla-get-application adoc)

(If (setq ss (ssget "_X" (list (cons 0 "INSERT") (cons 8 "S-stl-bms,S-stl-bms-d,S-stl-trus,S-stl-jst,S-e-stl-bms,S-stl-lintel,S-stl-brac e,S-stl-brace-d") )))

(progn (setq axss (vla-get-activeselectionset adoc))
(vlax-for a axss
(progn
(Setq Bml (getdynprop a "Distance"))
(Setq Ban (getdynprop a "Angle"))

;;;;;;;;;;Problem Here
(setq DBlst (entget (car (entsel a))))
(Setq DBang (cdr (assoc 50 axss)))
(Setq DBmir (cdr (assoc 41 axss)))



Any suggestions would be appreciated.

Regards,
Vince