New API Help Format

With the latest release of Fusion, a new format for the syntax in the help has been introduced.  Although this change has been made for the Fusion help, the same help system is also used for Inventor so these changes can also be fairly easily made for the Inventor API help too.  Because of that I would like to get feedback from both Inventor and Fusion users about this new format.

In the old help, the syntax was shown using a pseudo Python or Javascript syntax that represented that function as if you were writing the function.  In Inventor it uses a VBA style syntax.  It was pseudo code because it also included argument types which aren’t actually needed in Python or JavaScript but were include because they help to provide the full description. 

 

Old Style
Below is an example showing the MirrorFeatures.createInput method in both Python and JavaScript.

SyntaxSampleOldPython 

SyntaxSampleOldJavaScript

And here’s an example of how properties were represented using the isSuppressed property of the MirrorFeature.

SyntaxSampleOldPythonProperty

SyntaxSampleOldJavaScriptProperty

 

New Style
With the new syntax style it attempts to show how you would actually use the method, property, or event in your code.  So instead of showing the format for the person developing the API, it’s showing the format for the person using it. It’s not really a runnable sample but in many cases is very close.  Below is  the new format for the same method and property illustrated above.

SyntaxNewMethodPython

SyntaxNewMethodJavaScript

SyntaxNewMethodC

 

And here’s the syntax for the isSuppressed property.

SyntaxNewPropPython

SyntaxNewPropJavaScript

SyntaxNewPropC

 

There is also event specific syntax.  A Python example is shown below.  This illustrates fully what’s needed in order to implement that event.

SyntaxEvent

 

You can see all of the new help at the Fusion Learning Site.  Click the “Programming Interface” link and then use the table of contents to access the “Fusion 360 API Reference Manual” section, as shown below.

ReferenceManual

 

I Need Your Help
I can use your help with honest opinions about whether this new format is better than the old and then, with whatever format we continue with, su
ggestions about how to improve it.  I know there is still a lot of room for improvement.  Every time I use and look at the help I see some things that could be improved and I work on some of them in each release, but I’m sure some of you have some other and better ideas.  Feel free to post comments here or you can also send them directly to me at brian.ekins@autodesk.com.

-Brian


Comments

One response to “New API Help Format”

  1. MechMachineMan Avatar
    MechMachineMan

    I definitely like the old style how it shows the type; it’s useful for programming in VBA and VB.net for an “Inventor / WorkFlow-related only” programmer like myself.
    Maybe a combination of both would be best? You can’t really go wrong with too much information in a topic like, IMO. That being said, it is sometimes difficult to work with samples from the API, and there are a lot of things that don’t have samples, so that could be improved.

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading