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: 

Get currently active component

1 REPLY 1
SOLVED
Reply
Message 1 of 2
jeremiahrose
495 Views, 1 Reply

Get currently active component

I have a script that creates some geometry, and I want that to happen within the component that is currently active in the UI. I couldn't find any info about this in the reference manual or forums, so - what code should I use to get a reference to the active component?

1 REPLY 1
Message 2 of 2
jeremiahrose
in reply to: jeremiahrose

Found it:

app = adsk.core.Application.get()
design = app.activeProduct
comp = design.activeComponent 

Link to reference manual

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