AnyMacro
Mac OS, EnglishGeneral Usage Instructions
When enabled, the add-in records the resulting commands of actions that the user performs and collects them in the AnyMacro menu. If not stopped, the recording stops automatically after several commands, to avoid any performance degradation when the user is not setting up macros.
* Not all actions in Autodesk® Fusion 360™ result in "Commands" and some commands are not usable on their own. For example, Pick Circle/Arc Tangent does not generate a "Command" and Roll History Marker Here is triggered when clicking rewind in the history, but rewind first selects an item and then rolls.
Creating Macros
- Click Start recording and then launch a series of commands in the order you desire for your macro.
- If the commands you chose can be recorded, they will be added underneath the record command in the Command Recorder dropdown at the top of the AnyMacro panel.
- Should you desire to remove a command, you need just click its name within the dropdown.
- Once you stop recording, two new options: Save Macro and Reset Recording; should appear just under the record command along with a test macro at the bottom of the list. The test macro allows you to make sure everything works before you save it and see the changes you make to the command list.
- Finally, once you are satisfied with the macro, hit the Save Macro button. This will display a prompt that will ask you to name your macro. There are few restrictions on the name, however, make sure there are some numbers or letters as its ID will be created using the str.isidentifier() method for each character.
- You should now find your command under the Custom Macros dropdown. You can run, assign a key combination, and delete it right from the menu. Additionally, the macro is persistent, meaning it will remain between sessions of Fusion 360 and only needs to be created once.
Removing Macros
- Navigate to its location under the Custom Macros dropdown
- Select the remove option under the macro.
- A prompt will appear asking if you are sure you wish to remove it.
- Hit OK and the macro is now gone.
Creating Macros From API (EXPERIMENTAL)
- Create a dictionary representing your macro object.
- Set its key: name to the desired name for the macro.
- Set its key: id to the desired id. (Must be "A-z|0-9|_", no spaces!)
- Set its key: executeList to a list of command-ids to execute in the same order.
- Use json.dumps from the Json module to convert it into a string.
- Use Application.fireCustomEvent() with the id "AnyMacro_Add_Macro"
- Pass in your macro string for the additionalInfo argument.
- Check to make sure your macro is visible under the Custom Macros dropdown
Commands
Installation/Uninstallation
Install:
1.Download the installer from Autodesk App Store.
2.Right-click on the "Downloads" folder and select "Open in Finder".
3.Right-click on the "AnyMacro_macos.pkg" -> "Open With" -> "Installer".
Uninstall:
You can unload the add-in without uninstalling it by clicking the "Stop" button when the add-in is selected in the list box on the "Add-Ins" tab of the "Scripts and Add-Ins" dialog.
Unchecking "Run on Startup" causes the add-in not to be loaded in future sessions of Fusion 360.
- Navigate to the ./ApplicationsPlugins folder and select the app bundle you want to uninstall
- Either drag the app bundle to the Trash or right-click and select “Move to Trash”
- Right-click on the Trash-Can and select “Empty Trash”
- If you prefer keystrokes, you can also just select the app bundle and then hit Command+Delete to move the app to Trash, then empty the Trash and the app will be removed.
Additional Information
- Download the add-in from the Releases page.
- Unpack it into API\AddIns (see How to install an add-in or script in Fusion 360).
- Make sure the directory is named AnyMacro, with no suffix.
- The new menu TOOLS-> ANYMACRO is now available.
The add-in can be temporarily disabled using the Scripts and Add-ins dialog. Press Shift+S in Fusion 360 and go to the Add-Ins tab.
The AnyMacro add-in includes two built-in commands that are used in the built-in macro 'Align Camera'. These commands can be found under the menu item TOOLS -> INSPECT. The macro demonstrates how these two commands can be chained.
Built-in commands include:
- Change Cameras Up
- Change Cameras Forwards
Built-in macros include:
- Align Camera
Known Issues
Be aware of the following quirks in Fusion 360.
- Fusion 360 cannot handle all key combinations. Forget Alt+Left to roll back history, because Fusion cannot save this combination and it will be broken next time you start the application.
- Menu items in sub-menus are not always clickable (bug).
Contact
Author/Company Information
Support Information
If you get any problems, please check out the section on Fusion 360 quirks.
If that does not apply to you, please report any issues that you find in the add-in on the Issues page.
For better support, please include the steps you performed and the result. Also, include copies of any error messages.
Version History
Version Number | Version Description |
---|---|
v 1.0.3 |
Added new icons for builtin commands. Added a command that will halt any currently running macro. Added a separator between recorded commands and the Test Macro Fixed some grammar in the README Added in an alternate icon for the app since Autodesk did not like the first. Fixed bug where cancelling the naming of a new macro would remove the command history anyways despite not making a macro. Potential fix for error #1 Fixed bug with built-in camera command where the camera would break if an orthogonal forwards was selected. Fixed bug causing command queue to throw a silent error Reduced excess code and added additional util functions Added in a geometry library to the code utilities |