Data between Element.GetParameterValueByName, Element.Name, String.Contains

Hi Folks,
I have some problems with Data between Nodes “Element.GetparameterValueByName” and “Element.Name”.


It gives me the warning “Asked to convert non-convertible types”… Does anybody know how to solve the warning ?

Further i got a warning between node “Element.Name” and “String.Contains” that says “Object reference not set to an instance of an object”

Does anybody know how to solve the warning ?

Thank you all for your help.

/Silverflames

The get parameter value by name is returning a value and not an element. So that’s why you are getting the non-convertible error. The error for the string contains is probably because the element name node is not returning any results due to the error. FYI, the ignore case input is either true or false.

I am having a similar problem with a renumbering script that I am building. Is there another node that gets the parameter value by name and returns an element (or a parameter) instead of a string?

99/100 elements don’t store their mark as a number, enabling you to use values like 101A.

If you’re only using numbers (i.e. 101) you can convert the string to a number with a String.ToNumber node. If you are missing values you’ll want to remove the letters, convert to a number, and put the letters back.

There are a couple. Look for “ElementFilter.ByParameterEquals” from EvolveLAB_Beaker or “Element.FilterByParameterValue” from WombatDynamo. If you don’t have those installed, you can set up your own filtering mechanism to do the same thing using “Filter.ByBoolMask” like example below.