Category: Manufacturing

  • Fusion Add-In with .NET (C++ & CLR)

    I've written about using MFC from a C++ Fusion add-in. You could also use .NET from your add-in, and it's even simpler to set up. 1) Create a C++ add-in inside the "Scripts and Add-Ins" Fusion dialog: I'm leaving "Run on Startup" option above unchecked, because it would not be a good idea to pop up a modal dialog while Fusion is…

  • Fusion Add-In with MFC

    It is possible to use MFC functionality inside your Fusion add-in on Windows. First I tried going down the path of creating a C++ add-in inside the “Scripts and Add-Ins” Fusion dialog and then add MFC support to the created Visual Studio C++ project. However, that proved quite difficult and I just gave up and went the other…

  • Get Reference Distance of Hole Feature

    <?xml encoding=”UTF-8″>By Xiaodong Liang When you create hole feature, Inventor allows you to set the distances with the reference  edges. This can be got by HoleFeature.PlacementDefinition.DistanceOne and HoleFeature.PlacementDefinition.DistanceTwo If the reference  are not defined, you could iterate the edges of outer edge loop and  calculate the distance by Edge.Geometry.DistanceTo(point).  The following is an VBA code as a demo:  …

  • Fusion 360 Meetups

    Later this month I’ll be attending and presenting the Fusion 360 API at several Fusion 360 Meetups along the west coast. The list below contains links to the Meetup site where you can get more information about times and specific locations. Tuesday Feb. 16th – San Francisco Thursday Feb. 18th – Seattle Tuesday Feb. 23rd…

  • Insert external component

    The Fusion API provides access to your A360 projects and the files as well. Through that you can insert an external component if you want. The following sample lists your projects and the files in their root folder, and then lets you insert the selected one in the root component of your current model. When…

  • Selection object properties become invalid

    In your commands you can use SelectionCommandInput objects and they work fine. However, if you do certain modifications on the model, e.g. create a new sketch, then the Selection object of the last used SelectionCommandInput will become invalid: var onCommandExecuted = function(args) { try { var command = adsk.core.Command(args.firingEvent.sender); var inputs = command.commandInputs; // both are filtered for…

  • Run Fusion commands

    The online help already has a sample on listing all the controls in the user interface which also provides the id of  the CommandDefinition that the various controls reference.  You can also get to the sample from many help topics, including “UserInterface.toolbars” This sample is very useful when positioning your controls within existing Fusion toolbars and panels…

  • Fusion add-in path

    Some functions might require the full path to a given file. If you know it’s relative path to the add-in then the following could help. The below samples show how to get the add-in folder in different programming languages – these samples are based on the API online help sample: http://fusion360.autodesk.com/learning/learning.html?caaskey=caas/CloudHelp/cloudhelp/ENU/Fusion-360-API/files/ExportManager-Sample-htm.html Python def getAddInFolder(): import os…

  • Call web services from a Fusion add-in

    There are more and more web services available out there on the net and integration with those can bring real value to your product. Sometimes the web service in itself is the real value provided by the add-in in which case you do not really need to protect the IP of your add-in and might as…

  • Use Entitlement API from Fusion add-in

    If you have an app on the Autodesk App Store then you might want to check if the user actually paid for and downloaded your app from the store or just copied it from someone else’s computer. This what the Entitlement API can help you with.  In the September release the Fusion API exposed two…