In the image above, the pink and green group attempt to carry out the same function: select all instances of linetype and then delete this list. The pink group doesn’t work, the green group does.
How can one convert the output of the ‘Line Styles’ node to a string value so that the ‘All Lines of LineStyle’ node will accept it. I tried the node ‘String from Object’ in between the ‘Line Styles’ & ‘All Lines of LineStyle’ nodes but to no avail.
Delete All Instances of Linestyle from Project.dyn (5.7 KB)
Because the node is looking for “LineStyleName” which is a string. The pink one gives you an element, the bottom a string which is what it’s looking for.
Try and Element.Name node to get string.
Thank you kindly for the prompt reply. The Element.Name node is a great one to add to the repertoire. How does this differ from the String from Object node I was trying to use?
Unfortunately I inserted the Element.Name node into my script and while the error messages have disappeared, I still get an empty list in my All Lines of LineStyle node, as below:
@dynamo_den It’s working for me. Are you sure you have any det lines with that line style in your project?
Keep in mind that “empty” lists are typical when using a delete node because the elements disappear even though they are up stream. Disconnect that node and then verify you have lines of that type. Test to get them, then reconnect the Delete node.
Hi Salvatore - I closed my script, re-opened it, and now it’s working fine. Not sure what was wrong but my watch lists now look like yours
Thanks for the reply!
I happened to restart my session of Dynamo and now it’s working perfectly fine. Is this something common with Dynamo - or something unique to my session/script/pc?
Thanks for all your help!