Hi everyone. Whilst working on another script, a cool Group Edit script by BIMItWorks , I realised that I cannot get the Element.SetName node to work at all.
I tried this with a completely simplified graph, selecting just a GroupType or FloorType as an example at I always get “null” for success. Any ideas what I may be doing wrong?
I also tried SetParameterValuebyName (changing the “Type Name” parameter), but I get “Parameter is read-only” as an error.
Double click on the Element.SetName node, and check to see the contents. My guess is that there is a Python node in there and you haven’t installed either an updated build of the package or the IronPython 2 dependency which are built for your Revit release.
If the Element.SetName is returning null it means that the python node in the dyf is not completing.
Do you have IronPython2.7 installed? If you are on Dynamo 2 check that it is version 2.5
Update Clockwork for Dynamo 2 if you haven’t already
@Mike.Buttery@jacob.small I just went to check and lo and behold…you are both 100% right! Strangely, the problem appeared to be that I had a later version of IronPython rather than it missing entirely. Thank you both very much.
P.S. Any pointers on how I could get to a point where I can troubleshoot such an issue myself? Is it just a case of learning python and the “mechanics” of custom dynamo nodes?
The best way to learn is to do, so yeah pop open the custom node and look for warnings/issues/problems. It can also help you yo learn by helping others - this particular problem pops up once a week or more.
Lastly (and importantly enough that I gave it it’s own line), Dynamo likely told you at some point about a missing dependency, so carefully reading what you’re installing would have prevented this too (that noise you just heard while reading this is an infosec team is screaming ‘YES DO THAT MORE!’) as ‘which version of IronPython2 to install for your build is in the description of memory serves.
Great thank you! Actually, during the last few hours of searching the answer (that was staring me in the face after all), I’ve ended up learning a bunch of other things that seem to show up not infrequently (ElementTypes being renamed to Classes, having to connect SetName to a Type rather than an Element etc.) So together with your answer I now have 3 potential bits of advice to hand out just off this one topic
okay yes, i get that!
Thanks again all. In case anyone is interested I will post the full graph I was trying to assemble once it’s done.