Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to toggle component's visibility in API?

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
mojobility
853 Views, 3 Replies

How to toggle component's visibility in API?

Is there an API method to do the equivalent of toggling the lightbulb for a component in the gui's browser?

3 REPLIES 3
Message 2 of 4
prainsberry
in reply to: mojobility

Yes you can use:

 

Occurrence.isLightBulbOn Property

# Get
propertyValue = occurrence_var.isLightBulbOn


# Set
occurrence_var.isLightBulbOn = propertyValue

 

 

http://help.autodesk.com/view/NINVFUS/ENU/?guid=GUID-203a9b47-df8f-4373-9535-b3df3d8e558f

 

Here is a sample i put together showing this functionality recently:

https://github.com/tapnair/ShowHidden

 

 



Patrick Rainsberry
Developer Advocate, Fusion 360
Message 3 of 4
mojobility
in reply to: prainsberry

Thanks!  Now that you point it out I feel dumb having asked the question...

Message 4 of 4
prainsberry
in reply to: mojobility

Haha awesome!  No worries.  Never hesitate to ask a question here.

 



Patrick Rainsberry
Developer Advocate, Fusion 360

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