Hi,
I’m attempting to create some model lines with Dynamo and then change the linestyle of them to a linestyle that hasn’t been used within the project.
Normally I’d simply select all lines in the project and then filter to find the GraphicsStyle I need and SetParameterByName on the new lines but as I have not yet drawn a line of that style I need a different way (I am aware I could just draw the lines somewhere but I’d like to know if it’s possible to do so without).
I can get_Item(BuiltInCategory.OST_Lines) and then find the SubCategories but then I end up with Categories rather than Elements even though the list of SubCategories and GraphicsStyles technically matches up.
I had thought that I could find GraphicStyle.Name that matches the Category.Name and apply that GraphicStyle but I don’t know how to do that and it all feels like there should be a much simpler way (I’m only just fumbling my way around Python at the moment).
Any help appreciated, thank you!