Announcements
Autodesk Community will be read-only between April 26 and April 27 as we complete essential maintenance. We will remove this banner once completed. Thanks for your understanding

Get currently active component

jeremiahrose
Enthusiast

Get currently active component

jeremiahrose
Enthusiast
Enthusiast

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 Like
Reply
Accepted solutions (1)
695 Views
1 Reply
Reply (1)

jeremiahrose
Enthusiast
Enthusiast
Accepted solution

Found it:

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

Link to reference manual

2 Likes