Master Sketches & Global parameters
Many thanks to Rob Lockwood for the excellent pair of videos on master sketches. These are of great utility in bringing sanity to increasingly complex models.
A current shortfall in the use of master sketches is the lack of visibility of parameters contained in the master sketch when it is used in the in the child sub-assemblies which take values from the master sketch. Similarly there is no system to generate a live list of global parameters for a project.
Currently there is an import/export app for Parameters for which the python code is available, however this is an entirely manual process which would allow different components to easily fall out of sync. The solution must be both robust and automatic.
Observations on the behaviour of the import/export app:
- All parameters in a component are exported
- It exports both User parameters & Model parameters. Any similarly named parameter eg ”d1” which is transferred from one file to another will clash & cause the import to fail.
- Pre-existing names of User parameters which are identical are updated.
- Non-existing names are added.
- Upon this basis merges appear to run smoothly when dealing with the User parameters
To this end I started to look at how to achieve the required functionality using what is available.
The workflow would be as follows:
- Name all global parameters with a distinctive leading character pattern eg g_myGlobal
- Setup a parameters master file using the same name as the fusion project name, could be triggered by the first save operation from the master sketch
- On file save if target file does not exist then create new master parameter file based on the immediate project folder name
- All subsequent file operations are automagically hardwired to the parameters master file based on the name of the containing project
- Generate a macro as an alternative to the save button which also runs the csv export function on file save using the pre-set project_name.csv as the target
- Generate a macro as an alternative to the update button which also runs the csv import function on file update ( the yellow triangle update warning ), again using the pre-set project_name.csv as the source
- Auto Import and export only touches the parameters with the “g_” names in the User parameters
- Use a timer to check for changes to the parameters master file to trigger a change alert to the client component models similar to the current yellow triangle update warning.
- Use a spreadsheet which permits co-authoring so that the file can remain open.
The ability to make better use of a spreadsheet for naming would be excellent as then complex descriptive names based on trunk_branch_twig_leaf conventions become a snap. We have used this extensively for auto generation of names in other CAD & also PLC’s.
Initial shortcomings of the proposal – There is no functionality to address multiple concurrent users and the possibility of simultaneous multiple changes to the global parameter set. On day one the goal is to gain the primary functionality for a single user.
A variation on the proposal is to make better use of the spreadsheet linkage and access to dynamic parameter sets is to allow for easily switching configurations. It’s not a full blown configurations management facility but it is a convenient start.