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

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

charliex2
Advocate Advocate
616 Views
4 Replies
Message 1 of 5

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

charliex2
Advocate
Advocate

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

0 Likes
Accepted solutions (1)
617 Views
4 Replies
Replies (4)
Message 2 of 5

ekinsb
Alumni
Alumni

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
0 Likes
Message 3 of 5

charliex2
Advocate
Advocate

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?

 

0 Likes
Message 4 of 5

ekinsb
Alumni
Alumni
Accepted solution

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
0 Likes
Message 5 of 5

charliex2
Advocate
Advocate

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

 

cheers

 

0 Likes