FreeCAD Macros: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
No edit summary
(Added a Category to the Page)
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
*Macros are Python programs in FreeCAD that can be used to add functionality to FreeCAD
=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=
=Adding Downloaded Macros=
Line 5: Line 15:
*Download a macro
*Download a macro
*Drag and drop the macro into the Macros directory
*Drag and drop the macro into the Macros directory
*Drag and drop any supporting data files into the same directory


=Installing and Running Macros=
<html><iframe width="560" height="315" src="https://www.youtube.com/embed/L2VIpdKzp_0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></html>


=Macros Under Development=
=Macros Under Development=
*[[PVC Pipe and Fittings Library]] macro
*[[PVC Pipe and Fittings Library]] macro
*[[FreeCAD Module Part List Generator]]
*[[File:Simple_Copy_New_File.FCMacro.zip]]
=FreeCAD Source=
*https://www.freecadweb.org/wiki/How_to_install_macros
== Macros of interest ==
* [[FreeCAD_Macros/Automatic_Light_Gauge_Steel_Frame_Creator_And_Panelizer_Macro]]
[[Category: FreeCAD]] [[Category: FreeCAD Macros]] [[Category: Ergonomics and Productivity]]

Latest revision as of 17:50, 16 July 2022

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

Macros Under Development

FreeCAD Source

Macros of interest