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: 

BrepBody.getEntityFromTempId not existant?

1 REPLY 1
Reply
Message 1 of 2
Anonymous
264 Views, 1 Reply

BrepBody.getEntityFromTempId not existant?

I want to save a reference to a bRepFace when a user closes and then reopens a document, presumably I could do this by looking up the face based on the component name, body name, and then the tempId. 

 

The documentation here: http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-39FBB1EC-7E58-4A92-AF30-69D080E385ED

says that BrepBody has a function "getEntityFromTempId" but I get an attribute error and can't find it elsewhere in the documentation, does this function exist. If it doesn't can they fix the documentation or (better yet) add the useful function.

 

Otherwise, what is the best way of saving a reference to a specific BrepFace. I save my structure to a Json file, so it needs to be something that could be parsed from a string essentially. 

1 REPLY 1
Message 2 of 2
ekinsb
in reply to: Anonymous

Thanks for pointing out this problem.  I've updated the source of the documentation so it will be available the next time the help is pushed out.  The new description says:

 

Returns the temporary ID of this face. This ID is only good while the document remains open and as long as the owning BRepBody is not modified in any way.  The findByTempId method of the BRepBody will return the entity in the body with the given ID.

 

As you can see, it doesn't do what you want to do.  The best solution in your case will be to create an attribute on the face.  In this case you would be using attributes to essentially name the face. You can save the name you assigned to the JSON file.  You can read more about attributes in the Attributes topic in the API help.

 


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