New to API. Help with obtaining unique features in a component/design.

New to API. Help with obtaining unique features in a component/design.

vpasaga
Participant Participant
551 Views
2 Replies
Message 1 of 3

New to API. Help with obtaining unique features in a component/design.

vpasaga
Participant
Participant

Hello all. This is my first post here.

I'm new to Fusion API and Python. I'm trying to extract out the timeline and then creating a list of all the unique features used to create the part/model. I'm not really sure if I can get to use Pandas with Fusion API scripting. So far, thanks to @BrianEkins, I can extract out the timeline to a CSV file. I ultimately want to build a low fidelity part comparator that highlights if there are any missing features. 
If you have any suggestions or ideas that might help, please let me know!! 
Thank you!

0 Likes
552 Views
2 Replies
Replies (2)
Message 2 of 3

PinRudolf
Advocate
Advocate

Hi, to get the features look at the component objects.

 

If you start from a selection or from the baseComponent you might end up selecting the occurrences instead.

 

component = occurrence.component
compFeatures = component.features

for i in range(compFeatures.count):
    compFeature = compFeatures.item(i)

 

Show us how far you've got and we'll try to help along. 

0 Likes
Message 3 of 3

BrianEkins
Mentor
Mentor

The timeline contains a list of all the features in the parametric model.  The term "feature" in the case of the timeline includes modeling features but also includes sketches, constructions geometry, snapshots of occurrence positions, and probably a couple of things I'm forgetting at the moment.

 

From a timeline node, you can get the associated feature object and query it for additional information specific to that type of feature.  I'm curious what it is you're actually trying to accomplish.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes