Error in my "ResetUserSettings" routine.

Error in my "ResetUserSettings" routine.

JoistDetailer
Contributor Contributor
682 Views
3 Replies
Message 1 of 4

Error in my "ResetUserSettings" routine.

JoistDetailer
Contributor
Contributor

My programs have a save/reset function for saving user settings before a program runs and resetting them back right before my programs terminate.

 

I've just discovered an issue in my "ResetUserSettings" function.

 

If the user is working in the model thru an active viewport, the "UCSIcon" sysvar is 5.

 

My "Reset" routine errors out on the line (setvar "ucsicon" UserUCSIcon) when UserUCSIcon = 5 because the only values that appear to be valid are 0-3 - even though AutoCad can apparently go higher.

 

I can't find any references anywhere on a ucsicon sysvar setting > 3.  Does anyone have any suggestions?  thanks in advance...

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

Kent1Cooper
Consultant
Consultant

@JoistDetailer wrote:

....

If the user is working in the model thru an active viewport, the "UCSIcon" sysvar is 5.  .... the only values that appear to be valid are 0-3 - even though AutoCad can apparently go higher.

....


 

I haven't been able to find any option choices that result in a value of 5.  Where is that coming from?  How is it set into the variable?  What UCSICON settings are in effect when that's the value?  What version are you using?

Kent Cooper, AIA
0 Likes
Message 3 of 4

JoistDetailer
Contributor
Contributor

Good questions.  It was on another workstation and I can't duplicate it on mine.

 

On the other workstation, if I was in "paper" mode, (getvar "ucsicon") returned 1, but in "model" mode, (getvar...) returns 5.  I have no idea how it got set that way.

 

The USC Icon settings on the affected workstation are 3D, line width 1, icon size 50, model color white, single color, layout tab color 160 (same as mine).  AutoCad 2019, no add-ons.

0 Likes
Message 4 of 4

JoistDetailer
Contributor
Contributor

It seems that a custom .net application that we are using is setting this value somehow.  Every drawing that is created by that application sets the "ucsicon" system variable to 5.  The developers can't find where it's actually being done, though.  It's not in the dwt file, nor is it in the titleblock files that are inserted.  Somehow, somewhere, I think that .net application is writing that value directly to the drawing database (where there is no data validation) as opposed to setting the value thru the Autocad interface (where Autocad will prevent you from entering invalid data).

0 Likes