Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

setting dimension vars with vla-setvariable

4 REPLIES 4
Reply
Message 1 of 5
pdn
Advocate
754 Views, 4 Replies

setting dimension vars with vla-setvariable

Hi

wrote a lisp program to set all dimension var's to specific variables and save it as a dim style

Everything works perfectly except for the variable DIMJOGANG

I'm using

...

(vla-setvariable *obj*j "DIMGAP" 1.5) ;Gap from dimension line to text
 (vla-setvariable*obj*j "DIMJOGANG" 45) ;Radius dimension jog angle
 (vla-setvariable*obj*j "DIMJUST" 0) ;Justification of text on dimension line

...

but whatever value I put in for DIMJOGANG gives me

; error: Automation Error. Error setting system variable

tried it on acad2009 and 2010

 

anybody ?? it's driving me crazy

Thx in advance

Patrick

 

4 REPLIES 4
Message 2 of 5
Kent1Cooper
in reply to: pdn

I'm guessing here [I don't have that System Variable]....

 

Could it be that the value needs to be in radians rather than degrees, and that it won't accept a value larger than 2 pi?  See whether setting it to (/ pi 4) works.

 

Or, could it be that you have a space between '...variable' and '*obj*j' in the line above, but not in that line?

Kent Cooper, AIA
Message 3 of 5
scot-65
in reply to: pdn

Enter this at the command prompt:

(type (getvar "DIMJOGANG"))

 

If it reads "STR" then change to say "45"

If it reads "REAL" then change to say 45.0

If it reads "INT" then, as Kent says, it might require radians.

 

When all else fails, set it manually and reenter the type query.

 

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.


Message 4 of 5
pdn
Advocate
in reply to: pdn

Hi

thanks for the infor

sorry, the correct line should read    (vla-setvariable *doc* "DIMJOGANG" 45.0) ;Radius dimension jog angle

I already tried the 45.0 and the statement (type ... does return a REAL

Command: (type (getvar "DIMJOGANG"))
REAL

 

I reaaly don't understand it anymore, every other vla-setvariable works (BUG ??? )

 

Thanks for following up

Patrick

Message 5 of 5
pdn
Advocate
in reply to: pdn

Hi

found it, you have to give it in as the real value for PI/4 = 0.7854 (for 45 °)

thanks

Patrick

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost