Timeline item - which component ?

Timeline item - which component ?

Anonymous
Not applicable
648 Views
2 Replies
Message 1 of 3

Timeline item - which component ?

Anonymous
Not applicable

With mouse rollover on a timeline item, a tool tip shows the name of the item and the component it is in. Is this "timeline item"-to-"component" co-relation exposed in  the API ?

0 Likes
Accepted solutions (1)
649 Views
2 Replies
Replies (2)
Message 2 of 3

PinRudolf
Advocate
Advocate

Just thinking out loud, have not tried this yet:

 

If you get the timelineObject.entity it will probably return the feature.

A feature often has a parentComponent property which should direct you to the component the feature is in.

Component.name will give you the name of the component your timeline entity is connected to.

 

Does that help?

0 Likes
Message 3 of 3

Anonymous
Not applicable
Accepted solution

Hi PinRudolf,

 

Tried your suggestion, but the timelineObject.entity returns a "Base" type object. Could not go further from here.

 

In the mean while, found a way in the Fusion 360 API Reference Manual, to get the "timelineobject" from the "Feature" (and thus the component):

 

Ptr<Components> Comps = design->allComponents();

Ptr<Component> comp = Comps->item(x);

 

Ptr<Features> features = comp->features();


Ptr<Feature> feature = features->item(y);


Ptr<TimelineObject> timelineobj = feature->timelineObject();