showing the ucsicon

showing the ucsicon

Anonymous
Not applicable
366 Views
7 Replies
Message 1 of 8

showing the ucsicon

Anonymous
Not applicable
i am trying

thisdrawing.activeviewport.ucsiconon = true

and it does not show, why?
0 Likes
367 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable
You need to add something like:

ThisDrawing.ActiveViewport = ThisDrawing.ActiveViewport

Don't think about that line of code very much or your head may explode.
0 Likes
Message 3 of 8

Anonymous
Not applicable
I am not quite sure what you mean by your last sentence. However, WHY do I have to do that? That is two lines of code now.

I used ThisDrawing.SendCommand("UCSICON ON ") instead. One line of code.

Andrew
0 Likes
Message 4 of 8

Anonymous
Not applicable
> I am not quite sure what you mean by your last sentence.

Then you're safe.

> WHY do I have to do that?

In order to get the viewport to show the change. Assigning a value to the .UCSIconOn property sets a bit somewhere but does nothing else. Assigning a value to the .ActiveViewport property causes that value and others to be read and the results displayed. This lets you change several things about a viewport without updating the display after each change.
0 Likes
Message 5 of 8

Anonymous
Not applicable
OK. But is there any benifit to me using this approach instead of the UCSICON one?
0 Likes
Message 6 of 8

Anonymous
Not applicable
There are almost always benefits to avoiding .SendCommand when possible.
0 Likes
Message 7 of 8

sgrya1
Advocate
Advocate
This seems to work:

Dim UCSIcon as boolean


If UCSIcon = True Then ThisDrawing.SetVariable "UCSIcon", 1
0 Likes
Message 8 of 8

Anonymous
Not applicable
that's an interesting tip, thanks!
0 Likes