I am hoping someone can help me with this. It seems simple enough and i have a graph which works well for walls but for some reason I cant get this to work.
Basically i have some filters in the model which adjust the floors according to values either above or below the project level ie +100mm the slab colour is dark grey etc
We have created a shared parameter “IDENTITY_SLAB OFFSET LEVEL_SG” which we want to populate with the inbuilt “Height Offset From Level”.
I keep getting the _Warning: Element.SetParameterByName operation failed. _ No parameter found by that name.
The parameter does exist, i just cant get it to copy the values over.
Try using the node Element.Parameters and see if you can find the parameter you are looking for on the floors. If it is there, double check the exact spelling/capitalization and try again.
By null do you mean “0” (zero)?
If yes, then yes there are a few slabs which sit on the required level and as such would be zero
I have also noticed a few “null” values in the Element.SetparameterByName list. Could this be the problem. Do i need to filter out the zeros? How do i do that?
Unfortunately i cant share the file (against company policy) but i did try it on a smaller test file and had the same results.
Looks like the small test file was OK after all. The shared parameter was set to text, not numbers. Once corrected it was fine and worked as expected.
The main working file though is still having issues. the below image shows the null values. Left hand side is Element.GetParameterValueByName and right is Element.SetparameterByName
Seems the values are different amounts. I thought it might have been due to the negative values, but some of the negative values actually work fine further up the list.
OK, so i figured it out.
It seems that the parameter i was writing to was not added to all of the relevant categories. We had missed adding the shared parameter to the Structural Foundation category and these were the null values which appeared.