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: 

adding a unique description/item to a instanced component and then fetching it?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
charliex2
234 Views, 4 Replies

adding a unique description/item to a instanced component and then fetching it?

i have instanced components, i was hoping to user assign a string or number to the instanced components individually in f360 and then read it in the API, if i use description etc its obviously instanced. this is a half api/script Q and half using f360

 

thanks

4 REPLIES 4
Message 2 of 5
ekinsb
in reply to: charliex2

Fusion doesn't support adding unique information to each instance of a component.  However, the API does through something called attributes.  Each component instance is referred to as an "Occurrence" and using attributes you can add any information you want to each occurrence.  You can read more in the API help about occurrences and attributes.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 5
charliex2
in reply to: ekinsb

So would I have to write an Add In that allowed the use to set those attributes? Then read them out later in a script?

 

Message 4 of 5
ekinsb
in reply to: charliex2

Yes, since Fusion doesn't support it in the standard UI, you'll need to create your own custom command in an add-in.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 5 of 5
charliex2
in reply to: ekinsb

awesome,. thanks, i just need to assign an index number to each of the components 

 

cheers

 

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