Posts

Showing posts from September, 2023

Export Multiple Selected to Multiple STEP Files in One Go - FreeCAD Macro

Image
This macro will take the selected objects i.e. a number of seperate extrudes that you have ctrl selected from screen, and export them out as individual step files into your chosen directory.  A demonstration of this macro can be found on my youtube channel  https://youtu.be/IapVaYQWN2M . To use the macro take a copy of the below text. from PySide import QtGui folder = str(QtGui.QFileDialog.getExistingDirectory(None, "Select Directory")) a = Gui.Selection.getSelection() count = 0 import ImportGui options = None if hasattr(ImportGui, "exportOptions"): options = ImportGui.exportOptions(".step") for b in a: objs = [] objs.append(b) file = folder+"/"+str(count)+".step" ImportGui.export(objs, file, options) count = count + 1 Load freeCAD and from the top menu select macro > macros.  You will see the Execute Macro popup. Click on the create button and give your macro a name in the popup that follows. Click OK.  A new window will ap