Howie
July 6, 2021, 6:45am
1
Hi, there is a project parameter called Type and I’d like to get the values of it. But when I used Element.GetParameterValueByName it seems that what I got were the type names from the build-in parameters instead of the values from the project parameter Type. How to deal with such situation that the parameter name is the same as others? Thanks!
dynamo.dyn (6.6 KB)
Hello …the issue here is you have 2 Type parameter 1 instance and 1 type…try this here…
1 Like
If it is a shared project parameter you can use the GUID to find the correct one.
In my opinion is the real solution to start a conversation with the person who thought it was a good idea to make such a parameter in the first place.
3 Likes
@Bjorn_Keulemans1 …yeps thats best ;))))
Howie
July 6, 2021, 7:17am
5
Thanks @sovitek ! It can work but using index seems unstable as it may change over time. I am just wondering is there a stable way to do it.
You could try til filter the parameter , so you dont use list index
Howie
July 6, 2021, 7:21am
7
@sovitek Sorry I don’t get it… what filtering do you mean?
1 Like
String contain or something…but the best you can do is as Bjørn mention, dont name parameter this way!! good luck/ Søren
Howie
July 6, 2021, 7:34am
9
I see. Yeah maybe better to start a communication…
Thank you for your kind help! @sovitek @Bjorn_Keulemans1
1 Like
Yes Howie…absolutely best
Maybe these nodes from MEPover might be of use in this case:
They will search almost the entire model regardless of category, but you can always filter afterwards.
3 Likes