Delete linetype using Dynamo (Python 3)

Delete linetype using Dynamo (Python 3)

anthony_iskandar
Advocate Advocate
433 Views
3 Replies
Message 1 of 4

Delete linetype using Dynamo (Python 3)

anthony_iskandar
Advocate
Advocate

It was working several months ago, I think it's because the Python 2 is changed to Python 3, and I don't know how to solve this.

anthony_iskandar_0-1664520779664.png

anthony_iskandar_1-1664520875378.png

Please help.

 

0 Likes
434 Views
3 Replies
Replies (3)
Message 2 of 4

vancikv
Advocate
Advocate

The error message is pretty clear. Your input is a bunch of strings that naturally have no Ids in your Revit document. The script is not aware of the fact that they're actually names of line styles. You're saying "give me the Ids of these strings", but you actually need to say "give me the Ids of line styles that are named according to these strings". I don't see how this could have ever worked. Didn't you change the input from the last time?

0 Likes
Message 3 of 4

vancikv
Advocate
Advocate
To offer a solution: Try connecting the input of the "Element.Name" node directly in your script.
0 Likes
Message 4 of 4

stefan_gokstorp
Advocate
Advocate

there is a node from modelical that does exactly this. 

stefangokstorp_0-1664528984214.png

if you are hellbent on having your own code check how its done in that package. 
but i would just use that one

 

0 Likes