Is there a way to turn off visibility of the UCS with ilogic or the API

Is there a way to turn off visibility of the UCS with ilogic or the API

Anonymous
Not applicable
674 Views
3 Replies
Message 1 of 4

Is there a way to turn off visibility of the UCS with ilogic or the API

Anonymous
Not applicable

The question is in the title - I wasn't able to find an easy way - I'm doing it for screenshots, so I need to toggle it off and on as needed.

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

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous ,

 

Yes, it is possible. Try below iLogic code.

 

Dim oDoc As PartDocument 
oDoc = ThisApplication.ActiveDocument 

Dim oDef As PartComponentDefinition 
oDef = oDoc.ComponentDefinition 

Dim oUCS As UserCoordinateSystem 
For Each oUCS In oDef.UserCoordinateSystems 
	If oUCS.Visible = False Then
		oUCS.Visible = True 'Turn on 	
	Else
		oUCS.Visible = False 'Turn off
	End If 
Next

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



Message 3 of 4

Anonymous
Not applicable

The UCS did not change with that code - I'm talking about the UCS in the bottom left corner...

 

It's turned off in application options by the "Show Origin 3D Indicator" under "Display"

 

Currently I do it manually before taking a series of screenshots with some iLogic code - but it would be nice to toggle it in the macro.

0 Likes
Message 4 of 4

JamieVJohnson2
Collaborator
Collaborator

Look at Application.DisplayOptions.Show3DIndicator, and ShowXYZAxisLabels, and other options to be found.

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
0 Likes