Setting DIMSCALE

Setting DIMSCALE

Anonymous
Not applicable
940 Views
3 Replies
Message 1 of 4

Setting DIMSCALE

Anonymous
Not applicable

Hi All,

I am getting a Error with this code:

Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("DIMSCALE", 12.0);

I am getting a "eInvalidInput" error.

 

Jim

0 Likes
941 Views
3 Replies
Replies (3)
Message 2 of 4

chiefbraincloud
Collaborator
Collaborator

Not sure why you would get eInvalidInput on that, but I would just set the property on the Database object.

 

Get a reference to the database and use database.DimScale = 12

 

Dave O.                                                                  Sig-Logos32.png
0 Likes
Message 3 of 4

Anonymous
Not applicable

It works now...  I have to Lock the Document. 😞

 

0 Likes
Message 4 of 4

chiefbraincloud
Collaborator
Collaborator

Ahh... Didn't think of that.  It must be because of where you are calling it from, such as from code running in a Form, or from a command in the Session context.

Dave O.                                                                  Sig-Logos32.png
0 Likes