GetParameterValueByName - failing when feeding LinkElement and Elements

Hello, this seems simple but I can’t get my head around it, and i’d like to make it work without splitting these lists before extracting parameter values.

I’m feeding the OOTB node GetParamValueByName lists containing both walls from linked model and walls from the host model - node seems to be reading linkElements correctly, but fails on normal elements with error : Warning: Asked to convert non-convertible types

is the node getting the LinkElement the problem itself? I’m using LinkElement.Ofcategory from Bimorph

ultimately I split these lists and then sewn them together, still weird occurence though.

would it be possible to make a GetParameterValueByName node that would withstand more types of inputs?

I think you are looking at instances and not type.If you are after the Type name you need to retrieve the Type of the instance first

but same node and routing works if LinkElements and Walls are fed into it separately?

Hi @filip.kabelis probably the OOTB node GetParamValueByName not works properly with linked elements, you can try instead python to retrieve the type parameters.

The OOTB node will only look for elements in the active document. Several of the popular packages will have a similar node that works with linked elements aswell. Look at Rhythm, Steamnodes, Bimorph(I believe) or MEPover to name a few.

Otherwise you are looking af python, as @paris mentioned.

@filip.kabelis …probably you need this one here…

Try using the LinkElement.GetParameterValueByName and see if that works.

I suspect the reason why the OOTB node is throwing an exception is because to extract parameter values from an element the active document object is used and you’re giving it linked elements which obviously are not from the active document.

The BimorphNode LinkElement inherits from Dynamo’s Element base class so it should work with a heterogeneous list (i.e. a mix of LinkElement and Elements).

1 Like

Hey, digging this thread up, as I got around it by splitting list between Elements in current document and LinkElements.

Now I’ve checked what you guys suggested here, and weirdly converting LinkElement to Element and feeding it into OOTB GetParamValue node returns an error.

Feeding LinkElements into an Bimorph LinkElement.GetParamValue without conversion returns the same result as OOTB node without conversion.

Replying to your suggestion to use Bimorph LinkElement GetParamValue for heterogeneous list - it returns an error “Asking to convert non-convertible types”