FreeCAD Macros: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(→About) |
||
Line 4: | Line 4: | ||
*'''Useful for rapid workflow:''' if you have a bunch of steps to communicate through the user interface - just activate a macro instead to save you time. | *'''Useful for rapid workflow:''' if you have a bunch of steps to communicate through the user interface - just activate a macro instead to save you time. | ||
*Sometimes these programs require supporting data files, such as CSVs or PNGs - or whatever supporting data that the macro requires. | *Sometimes these programs require supporting data files, such as CSVs or PNGs - or whatever supporting data that the macro requires. | ||
==Examples== | |||
Set yourself up for rapid rotation of objects: | |||
FreeCAD.DraftWorkingPlane.alignToPointAndAxis(FreeCAD.Vector(0,0,0), FreeCAD.Vector(-0.0,-1.0,-0.0), 0) | |||
FreeCADGui.Snapper.setGrid(init=True) | |||
=Adding Downloaded Macros= | =Adding Downloaded Macros= |
Revision as of 23:57, 26 November 2020
About
- Macros are Python programs in FreeCAD that can be used to add functionality or shortcuts to FreeCAD.
- Useful for rapid workflow: if you have a bunch of steps to communicate through the user interface - just activate a macro instead to save you time.
- Sometimes these programs require supporting data files, such as CSVs or PNGs - or whatever supporting data that the macro requires.
Examples
Set yourself up for rapid rotation of objects:
FreeCAD.DraftWorkingPlane.alignToPointAndAxis(FreeCAD.Vector(0,0,0), FreeCAD.Vector(-0.0,-1.0,-0.0), 0) FreeCADGui.Snapper.setGrid(init=True)
Adding Downloaded Macros
- To add a macro to FreeCAD - find the Macros directory by going to FreeCAD->File->Preferences->Macros - which shows the macros directory such as /home/marcin/.FreeCAD
- Download a macro
- Drag and drop the macro into the Macros directory
- Drag and drop any supporting data files into the same directory
Installing and Running Macros