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: 

Object model schema

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
516 Views, 3 Replies

Object model schema

I am working on a project which requires me to know the full schema of fusion 360. I've considered scrapping the documentation page because it has all the information I need; However, I was hoping there would be a more direct way to get this information. 

 

I plan to generate a document which has all types (and possibly their descriptions) for every field in the API.

 

Similar to this: 

# The top-level object that represents the Fusion application (all of Fusion). This provides access to the modeler and files.
type adsk_core_Application {
# Returns the current active document.
activeDocument: adsk_fusion_FusionDocument
# Returns the current edit target as seen in the user interface. This edit target is defined as the container object that will be added to if something is created. For example, a component can be an edit target so that when new bodies are created they are added to that component. A sketch can also be an edit target.
activeEditObject: adsk_fusion_Component
# Returns the current active product.
activeProduct: adsk_fusion_Design
# Returns the currently active graphics view.
activeViewport: adsk_core_Viewport
# Returns the User that is currently logged in.
currentUser: adsk_core_User
# Returns the Data object which provides access the files.
data: adsk_core_Data
# Returns the Documents collection object which supports accessing opened documents, opening existing documents, and creating new documents.
documents: adsk_core_Documents
# Returns the set of favorite appearances.
favoriteAppearances: adsk_core_FavoriteAppearances
# Returns the set of favorite materials.
favoriteMaterials: adsk_core_FavoriteMaterials
# Returns the ImportManager. You use the ImportManager to import files (of various neutral formats.) into existing components or new document.
importManager: adsk_core_ImportManager
# Gets and sets if Fusion is offline or not.
isOffLine: Boolean
# Boolean property indicating whether Fusion has completed its initialization. This includes initialization of all the Add-ins loaded at startup
isStartupComplete: Boolean
# Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isValid: Boolean
# Returns the collection of material libraries currently available.
materialLibraries: adsk_core_MaterialLibraries
# Returns a string indicating the type of the object.
objectType: String
# The modeling tolerance used internally when comparing two points. The value is in centimeters.
pointTolerance: Float
# Provides access to all of the application preferences.
preferences: adsk_core_Preferences
# Returns an array containing the names of the products types currently supported by Fusion. For example, the name returned for Fusion is "DesignProductType". These product type names are used to identify specific products in some other API functions such as the productType property on the Workspace and ToolbarPanel objects.
supportedProductTypes: [String]
# Returns the internal name of the Autodesk account currently logged in. This can be used by applications sold through the Autodesk Exchange Store to verify that the user has in fact purchased the product.
userId: String
# Provides access to functionality specific to the user interface.
userInterface: adsk_core_UserInterface
# Returns the user name of the Autodesk account currently logged in.
userName: String
# The modeling tolerance used when comparing vector angles. The value is in radians.
vectorAngleTolerance: Int
# Returns the current version of the Fusion application.
version: String
}

 

3 REPLIES 3
Message 2 of 4
ekinsb
in reply to: Anonymous

I think probably the closest thing that's publicly available that will have the information you want in a format you could automatically extract it is the header files that we provide for those that are using C++.  On my machine they're located in C:\Users\ekinsb\AppData\Local\Autodesk\webdeploy\production\0a99a95d1829c277c4fd9bfe84b64655d50a4165\CPP\include.  Take a look at what's in there and see if that provides what you need.  It should be significantly easier than trying to scrape it out of the HTML documentation.


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

Thank you! I actually ended up finding .json files with all the type definitions when I started poking around the application. 

Message 4 of 4
ekinsb
in reply to: ekinsb

If you're wanting more of the class structure, someone just pointed out another file you might be interested in. There are a set of files that we provide to Spyder so it can provide better code hints.  There aren't any help strings here but it does provide more of the class structure and is very readable as JSON.  Take a look at the files in: C:\Users\ekinsb\AppData\Local\Autodesk\webdeploy\production\7ca01d20fe2dafa65f944d9236f39fdec21b9b7a\JavaScript\defs

 

 


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