Thanks Roland.
In fact, I was thinking a solution for saving a template as a part could be as simple as doing just that.
For example, at the "How do you want to use this template" dialog, simply add the options to either create an inline or standalone part.
In LDCad, out-of-the-box templates are all parts but, oddly, they are not persisted in the model as such.
For the inline part, I imagine the behavior could be to write the custom part file into its parent mpd - as you can do with MPDCenter for example.
For the stand alone part, I would parameterize this with a preference setting enabling the user to define where to save custom parts. Example locations:
- unofficial library path
- unique path
- model location (default)
There is already a parts bin filter group for all parts used in the current model - which I notice also lists ldr files. This location can be optimized for custom/editable parts.
I think this approach is elegant as custom parts will have exactly the same characteristics as other parts allowing LPub3D or any other editor a singular logic to determine.
For the substitution framework, I intend to use an alias table (like annotations currently) perhaps loaded into memory on startup as this approach will be independent of editors so someone editing with MLCad or whatever can also take advantage of alternative representations.
Cheers,
Trevor
In fact, I was thinking a solution for saving a template as a part could be as simple as doing just that.
For example, at the "How do you want to use this template" dialog, simply add the options to either create an inline or standalone part.
In LDCad, out-of-the-box templates are all parts but, oddly, they are not persisted in the model as such.
For the inline part, I imagine the behavior could be to write the custom part file into its parent mpd - as you can do with MPDCenter for example.
For the stand alone part, I would parameterize this with a preference setting enabling the user to define where to save custom parts. Example locations:
- unofficial library path
- unique path
- model location (default)
There is already a parts bin filter group for all parts used in the current model - which I notice also lists ldr files. This location can be optimized for custom/editable parts.
I think this approach is elegant as custom parts will have exactly the same characteristics as other parts allowing LPub3D or any other editor a singular logic to determine.
For the substitution framework, I intend to use an alias table (like annotations currently) perhaps loaded into memory on startup as this approach will be independent of editors so someone editing with MLCad or whatever can also take advantage of alternative representations.
Cheers,
Trevor