Andresig Posted June 18, 2009 Posted June 18, 2009 I am making some routines in VBA I need to know the units of the drawings I recieve so I can setup the variables. I have found a class named AcMeasurementUnit but dont know how to retrieve the info in it. Please... help. thanks! Quote
BIGAL Posted June 19, 2009 Posted June 19, 2009 Are you maybe after something like this (defun civ_units () (SETQ ANGBASEE (GETVAR "ANGBASE")) (SETQ ANGDIRR (GETVAR "ANGDIR")) (SETQ LUNITSS (GETVAR "LUNITS")) (SETQ LUPRECC (GETVAR "LUPREC")) (SETQ AUNITSS (GETVAR "AUNITS")) (SETQ AUPRECC (GETVAR "AUPREC")) (SETVAR "LUNITS" 2) (SETVAR "ANGBASE" 0.0) (SETVAR "ANGDIR" 0) (SETVAR "LUPREC" 0) (SETVAR "AUNITS" 0) (SETVAR "AUPREC" 0) ) (defun old_civ_units () (SETVAR "LUNITS" lunitss) (SETVAR "ANGBASE" angbasee) (SETVAR "ANGDIR" angdirr) (SETVAR "LUPREC" luprecc) (SETVAR "AUNITS" aunitss) (SETVAR "AUPREC" auprecc) ) probably will meet you needs may just need a few more variables. Quote
dbroada Posted June 19, 2009 Posted June 19, 2009 how about thisdrawing.GetVariable("lunits") and thisdrawing.SetVariable "lunits",1 Quote
fuccaro Posted June 19, 2009 Posted June 19, 2009 Thread moved in the VBA forum. Welcome Andresing! Quote
Andresig Posted June 30, 2009 Author Posted June 30, 2009 Dim MUnits As Integer MUnits = ThisDrawing.GetVariable("lunits") If MUnits = 2 Then MsgBox MUnits & " Drawing in Milimeters" Else MsgBox MUnits & " Drawing in Inches" End If Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.