I’ve been developing a fairly complex macro for FreeCAD and wanted to split the code out into a module with separate files.

I couldn’t find instructions how to do this anywhere, but thankfully someone on the very helpful forum FreeCAD Forum gave me this answer.

So now I have the following in my macro folder:

  • Legify a sub-folder containing the Python module source files

  • legify-brick.FCMacro a macro file importing the module as follows:

    from Legify import Brick

This structure can be seen in the macro repository on GitHub

Leave a comment
Comments will go into a moderation queue.
Please provide a first name.
Please provide a last name.
Please provide a valid email address.
Your email will never be shared.
Please provide a comment.