Split a long macro into multiple files?

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
vectronic
Posts: 52
Joined: Sun Feb 18, 2018 9:44 pm

Split a long macro into multiple files?

Post by vectronic »

Hello,

I'm writing my first macro and it is turning out to be quite long: pretty comprehensive GUI dialog, multiple python classes etc.

Is it possible to split code for a macro across multiple files? e.g. one .FCMacro file and then some other auxiliary .py files?

If it is possible, is it recommended? And are there any best practices for this?

Thanks,
Vectronic

OS: Mac OS X
Version: 0.17.13017 (Git)
damian
Posts: 583
Joined: Sun May 31, 2015 6:16 pm

Re: Split a long macro into multiple files?

Post by damian »

The macro workfeatures is a nice example of module launched by macro. It is in the macros recipies
vectronic
Posts: 52
Joined: Sun Feb 18, 2018 9:44 pm

Re: Split a long macro into multiple files?

Post by vectronic »

Excellent - thanks!

Exactly what I was looking for!

Thanks,
Vectronic
Post Reply