Element.SetParameter struggles

 

 

Hello. I’m very green in using Dynamo, but dang, I love what is happening here! I’m really struggling figuring out how to learn input/output methods. I found a demo of building a parameter to supply a Bottom of Pipe (BOP) calculated off available parameters. It works! But we’re a Piping company, and there’s a lot of options that can’t be picked up thru scripting, like Bottom of Insulations!

 

So I’ve been working on modifying the tutorial I followed on BOP, and moving toward Insulation. Pipe Insulation is a single category, along with pipe, but somehow it’s attached to Pipe, and I think this is part of my struggle.

(I apologize ahead of time for the split screenshot, figured readable with a slight break/overlap vs. too small to read was better.)

dynss3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Warning: Element.SetParameterByName operation failed.
The parameter’s storage type is not an Element.
Element.SetParameterByName operation failed.
The parameter’s storage type is not an Element.

 

I receive this error on compile. Element.SetParameterByName is getting it’s input Element from Pipe currently (Screenshot shows PipeInsulation), but I’ve tried Pipe Insulation which isn’t exposed to the user in the project without building a schedule. This is for annotating BOP/BOI, so it won’t work. I need to tie it back to the Pipe.

 

What is my major malfunction here? My other “Element.SetParameterByName” for setting BOP works just fine (Can’t help from feeling like it has something to do with the Pipe Insulation category itself being nested to a Pipe Object, but I’m obviously missing something here.

 

 

It looks like your IF node is pumping out an element. I can only assume that the parameter is looking for a number. Where are you grabbing that elevation you need in your graph?

I have them coming as strings from the Pipe Family. The value should be numeric, and that’s what I don’t quite get. My IF statement shows it’s populating with the “Insulated” pipes, the Pipe themselves are pulling the proper values for pipe diameter and offset, the IF statement sees the proper values and makes the decision for insulated pipe, but it seems to fail on my set.Parameter.

 

Being the newbie I am at this, do I need to convert the Element.SetParameterByName to using a “Number” instead of a “String”?