How to change Spotelevation's parameter value(Display Elevations)

dynamo

#1

Hi all.
I just wonder how to change parameter value in the drop box menu(attached image 1)

I want to change Spot Elevations’s Display Elevations from “Actual Elevations” to “Top & Bottom Elevations”

So I tried like image 2… but it didn’t work…

please help me .

Image1


Image2


#2

Just throwing in an idea.
I managed to get that working when sending a particular element into a parameter, but I had to convert the string to an element first.
Maybe “Top & Bottom Elevation” is not a string and you’d have to convert to something else it make it work. Maybe you can read it out using Element.GetParameterByName and check what kind of inputs it would want.


#3

Alternatively try checking if this might be handled by interger representations, it might be that:
Actual (Selected) Elevation = 0
Top Elevation = 1
Bottom Elevation = 2
Top & Bottom Elevations = 3

You could as @PauLtus suggest check this using the GetParameterByName, you can use the Object.Type node to check the output.


#4

@Jonathan.Olesen,

You are right. Snooping a spotelevation shows that it’s an integer value.

Capture2


#5

That’s what I thought :slight_smile:

So @Chan, your solution would be to use the value “3” as your value input.


#6

@Jonathan.Olesen, @3Pinter, @PauLtus, Thank you!!. It really helpful!!.

I’m sorry to bother you, but I’d like to ask you one more question.

I want to change the Spot Elevations’s type. For instance, from “FL” to “FL + SL”. Because It always result “FL” when I ran this logic…

So I tried to select “FL” or “FL + SL” type using “Family types” node, but I cannot find anything. I’m not sure but I think it’s because they are Instance.

Please let me know how to change or
How to print " FL+SL " from the beginning without having to change it.

Image 1


Image2