Hi
I’m trying to automate some Line Style generation for template creation.
I have a basic graph working which takes an Excel sheet and generates new Line Styles (‘GraphicsStyle’ items) using a Bimorph node. Unfortunately, the Bimorph node does not allow the user to specify a Line Pattern (‘LinePatternElement’) for the GraphicsStyle.
I built a second, simpler, graph to apply Line Patterns to existing Line Styles and I have it 90% of the way there, I think. I’m not very experiences in Python but a complete API novice so I’m a little stumped by the code requirements and the precise meanings of some of the terms.
This is the application test graph.
It’s completing the script for each instance passed through if I comment out lines 40 & 41. But 40 gives this error message:
Here’s my code.
Python Script v1.py (1.5 KB)
This seems to be some of the process in Design Script (I think):
Unfortunately, I’m just not familiar enough with the background processes and wrapping/unwrapping elements etc. or Design Script generally to get it to work.
Any help would be greatly appreciated.
Also, if anyone has any idea how to assign ‘Solid’ (the Revit built-in value) as a pattern (the error at the bottom of the Generate … graph), or any thoughts on the API language required to automating the generation of Line Patterns themselves, that’s my next project and it would be very welcome too. I’ve not built it yet but I’m pretty confident I can get a graph to pass sequential dash/gap requirements to a Python script.
Thanks as always for the great resource and community that is the DynamoBIM forum!
(first time uploading attachments - I hope I’ve managed)