Save thousands of mouse clicks and automate remedial tasks with User Language Programming (ULP) and scripts in Autodesk Fusion 360.
No matter how simple or complex your design is, you will always look for ways to optimize your design time. I’m sure you have mapped out your keyboard with your most frequently used commands, but what happens if you want to execute a sequence of commands? Or an interactive routine for a specific output? What if I told you that Fusion 360 has a scripting system that can save you thousands of mouse clicks by automating some of the most remedial design tasks?
Scripts
The Fusion 360 electronics workspace provides a command-line interface that can easily access and invoke all available commands. Those who have used Autodesk EAGLE for a long time will find it very useful. You can avoid encountering the correct icon for your following design action by frequently using the command line interface. In our bellow example, the command line will move R17 to the specified location.
With the command line, it is possible to invoke multiple commands, for example:
Grid mm; MOVE R17 (120 217; You are now ready to move the selected part after changing the units and grid size.
A SCRIPT consists of a text file that contains a sequence of Fusion 360 electronic commands. The text file must use the extension .SCR so the file can be appropriately executed in Fusion 360. An excellent example of a script file available in Fusion 360 is defaultcolors.SCR. This sequence of commands will set up the electronic environment to the default colors.
With a basic knowledge of the Fusion 360 electronic commands, you can create scripts to translate and import files. Additionally, script files can invoke other script files. Follow this link to see a list of the available command in Fusion 360.
User Language Programming (ULP)
Besides using the command line and creating a script file, Fusion 360 also offers a powerful User Language Programming (ULP) feature. This feature allows you to use a familiar C-like programming format that gives you the power to implement customized functions. A few examples of using ULP are generating a specialized BOM format or adding teardrops to your PCB PADs and Vias.
The advantage of using a ULP is that you can define an interface to set up the different options that you will use for your ULP. In this example, you can notice the option of applying the teardrop effect to Pads only, or Vias only, or both. You are also provided other parameters such as Apex Radius Factor and others. We strongly recommend you include a help documentation option explaining all your choices.
ULP applications
ULPs have a few applications, including:
- Creating a customized part list
- Manipulation of silkscreen print out
- Renumber board sequence on PCB
- Get design statistics
- And many more
Fusion 360 has implemented the means to execute Scripts and ULP’s much faster than Autodesk EAGLE. Running a ULP will often require Fusion 360 to generate script files with a sequence of commands that need to be performed on the design. Completing the ULP will cause the task to take a very long time. Our team of developers has made the running time 60x faster. Depending on the design size and task required, some ULPs may take up to six minutes to complete. With Fusion 360, ULPs now only take mere moments.
ULP completion time comparison
We ran some of the most used ULP and Scripts in EAGLE and compared their completion time using the same design in Fusion 360. These were our results:
ULP Name | EAGLE v9.6.2 | Fusion 360 update |
Teardrop.ulp | 4:10 Minutes | 6.5 Seconds |
Teardrop Undo | 6:02 Minutes | 3.5 Seconds |
cmd-renumber | 9 Seconds | 2 Seconds |
Panelize | 55 Seconds | 3 Seconds |
Copy-silkscreen | 3:50 Minutes | 10.5 Seconds |
Import DXF | 3:10 Minutes | 5.5 Seconds |
To find out more about the use of ULP with Fusion 360, please visit this link and learn how to make your own.
The use of ULP and Script is the strongest customization feature of Fusion 360 Electronics. You no longer need to wait for a specific command to be developed. You can write your own set of commands or search only since many users have publicly shared their tools. Many board houses will provide ULP and\or Scripts for specific outputs to get your PCB’s manufacture board faster. You can also use Scripts to create a sequence of commands that don’t rely on a response while running.
Ready to start your journey with the Fusion 360 electronics workspace? Download a free trial today.