Macro Build Utility
File:Macro Build Utility Macro Build Utility |
Description |
---|
This macro provides a Build Utility to assemble multiple project files into one project file. Author: Piffpoof |
Author |
Piffpoof |
Download |
None |
Links |
Macros recipes How to install macros How to customize toolbars |
Macro Version |
1.0 |
Date last modified |
None |
FreeCAD Version(s) |
None |
Default shortcut |
None |
See also |
None |
Description
This macro is intended for use on large projects, ones involving hundreds of objects. It's use on a small single file project would be pointless and unnecessary. However on a large project with many objects and many files to be merged into the final one, it will save time, avoid the user being involved in repetitive actions, and remove human errors.
Installation
All the code for buildUtility.FCMacro is in one macro. So installation is comprised of copying the code to the appropriate Macro directory and invoking the Build Utility from the Macro menu, the Python console or a toolbar button (the preferred method).
Usage
The Build Utility works on the same principals as the build files that are used to assemble large software system (like FreeCAD). A text editor is used to create a text file which adheres to the formats required by the Build Utility. The Build Utility then simply reads each line of the text file and performs the actions specified by that text file.
This function asks the user for a "build file". It then parses that build file, there are 3 legal line types: - lines starting with the comment character "#" which are ignored - lines starting with the subfile character "@" which are ignored Note: the "@" character is for future enhancement when sub-build files will be handled - all other lines which may be a project file or a subfolder (sub-directory) If the line is a subfolder then the project file is read from that subfolder. Otherwise it is assumed the line specifies a project file. A new document is created and each project is "Project Merged" into that new and empty document. The document is not saved at the end, this is left for the user if desired. If the file does not exist then the file name is Printed to the Report view
User Interface
There really isn't a GUI at all for this macro. The macro reads a text file that has been prepared with a text editor and produces a model in an output document. Other than clicking the button on the toolbar to start the process, there is no user interaction.
Example
Options
Remarks
Links
none (so far)
Script
not here yet, coming soon