Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Autocad Dimension Data

Status
Not open for further replies.

AlexDring

Mechanical
Joined
Dec 31, 2002
Messages
117
Location
US
Is there a way to extract the value of a acad dimension with some sort of getvar or getval?
 
With EntGet and Car or Cadr perhaps.
 
Hi AlexDring...

This function I did You can help You:

(defun get:value (/ dim-ent value)
(setq dim-ent (vlax-ename->vla-object
(car (entsel "\nSelect object dimension: "))
)
)
(if (vlax-property-available-p dim-ent "measurement")
(progn
(setq value (vlax-get-property dim-ent "measurement"))
(prompt (strcat "\nDimension value is: "
(rtos value 2 (getvar "dimdec"))
)
)
) ;_progn
(prompt
"\nThis object don't have this property. Try again..."
)
) ;_if
(princ)
) ;_defun

FORO: Un saludo de SpeedCAD... ;)
CHILE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top