Not quite sure how the material attribution works for this.
I have tried both to have the material available in the template and in the main family where I run the script and, in both cases, the material is not applied to the solid.
At the same time if in the template a Subcategory is already available the node produces an error.
@solamour or someone else in the forum can please explain a little bit better how this node is supposed to work?
The code is here so I bet you can investigate
Exactly…on the paper it should apply a material if it is available in the new created document (based on the supplied template)
Doubt: the material parameter is of type ElementId and the method uses a SetParameterValue providing the name of the material only. I would probably find the ID of the material based on the name and then apply that as ElementId or apply the FirstOrDefault() if not found
For the SubCategory should check if the subcategory exists in the template before creating a new one otherwise there is no point in using a template.
Any thoughts? Do I need to go and build my own (we try to avoid third party packages in our scripts).
Cheers
Spring nodes has one too (python)
Tested and doesn’t apply the material as well