.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SetSystemVariable has no effect

1 REPLY 1
Reply
Message 1 of 2
FrankLenoir
629 Views, 1 Reply

SetSystemVariable has no effect

The value of InsertUnits in a drawing is millimeters and I want to set it to meters.
I have tried two techniques:
{code}.Application.SetSystemVariable("INSUNITS", 6){code}
and
{code}.Database.Insunits = UnitsValue.Meters{code}
When directly after setting the system variable is read back, it still has the value millimeters.
I have the same problem with other system variables. I use AutoCAD 2010 and VB 2008 express.
Does anyone recognizes this problem?

Thanks for any help
1 REPLY 1
Message 2 of 2
fieldguy
in reply to: FrankLenoir

I hit this problem again today - once too often.  I found a post from Tony T (http://forums.autodesk.com/t5/NET/Set-Current-Lineweight/m-p/2582292/highlight/true#M16414) that worked again, this time for IMAGEFRAME.  I want IMAGEFRAME = 2 in a long list of files.  I am using CommandFlags.Session, and acmgd from Acad 2010.  I figured I should post here because of the topic title.  I know I will have to search it again. 

 

Application.SetSystemVariable("IMAGEFRAME", System.Convert.ToInt16(2))

 

 

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost