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: 

Unable to access TimelineObject entity

5 REPLIES 5
Reply
Message 1 of 6
ghhanJV85V
240 Views, 5 Replies

Unable to access TimelineObject entity

Hi,

I have been trying to get the entity of a TimelineObject by simply calling TimelineObject.entity and the API documentation says that either the entity will be returned or it will return null if the TimelineObject is a group (2nd screenshot). However, since I realized that calling entity on my timeline object was doing neither, I put it in a try catch statement (1st screenshot), and since it always goes to the catch, I believe calling entity is raising an error. Is there a reason for this?

 Screen Shot 2017-05-03 at 12.10.35 AM.pngScreen Shot 2017-05-03 at 12.14.21 AM.png

5 REPLIES 5
Message 2 of 6
ekinsb
in reply to: ghhanJV85V

Can you attach a model that demonstrates this problem?  Probably what's happening is that there's a type of entity in the timeline that the API has overlooked and doesn't support.  We need to correct that but we need to know what type of entity it is.  Depending on what you're doing it might be ok to put a try except around getting the entity property and just continue even if there is an exception thrown.


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

I haven't attached a model here because the snippet of code is part of a much larger framework. However, I have included some pictures of some of the TimelineObjects that raise an error when attempting to retrieve their entities. In these cases, I can't just leave allow the exception to be raised because I need the entities for these TimelineObjects. Hope this clears things up.Screen Shot 2017-05-03 at 3.12.54 PM.pngScreen Shot 2017-05-03 at 3.15.39 PM.pngScreen Shot 2017-05-03 at 3.14.30 PM.pngScreen Shot 2017-05-03 at 3.15.32 PM.png

Message 4 of 6
ekinsb
in reply to: ghhanJV85V

Thanks for the picture.  It's what I suspected and the API doesn't currently have support for those features.  Hopefully it works in your workflow to just skip over unrecognized features. I've added this to our backlog but don't have a timeframe when we'll be able to work on it yet.


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

If I am unable to access the entity for some timeline objects, is there some other way to access the body or face that was affected?

Message 6 of 6
ekinsb
in reply to: ghhanJV85V

There isn't a way to access information for these features because the API currently doesn't know anything about them. I've added this to our backlog and we'll prioritize with the rest of the work we're doing. I don't now exactly when it will be available right now but it should be relatively soon.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog

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