How can I extract a parameter value from a Revit value's suggestion list (or checkbox)

The information extracted by my script is for “Fonction”: “1” and it should be “Exterieur”. How can I fix that :confused: ?

we need a bigger picture to understand what is going on there

storage type
interior = 0
exterior = 1
etc

This parameter is stored as an internet, not a string.

See this post for further clarification:

1 Like

This should make things clear:
and this way you can set the Parameter Function to inerior or exterior etc

Select elements parameter ID, Storage Type, Value, Name etc.dyn (14.8 KB)

2 Likes

Damn, that is a pretty powerful parameter.

5 Likes

@Nico_Stegeman
The problem is more complex as I have a lot of automated tasks and the parameters checked are read from an Excel List :cry:

Problematic

1 Like

can you send youre revit and .Dyn file ?

@jacob.small or someone else who is more knowledgeable than me, I can’t remember if this is true but can you accomplish some form of integer to string connection through Revit API’s enumerators? I understand that setting values in API code uses an integer but there has to be some way to connect it to the string enumerator right?

Because of company resctrictions I can’t share the Revit file. :cry:

Laughing out loud! My bad.

Stored as an integer*

2 Likes

Not that I am aware of. You just kinda need to learn it in this case. (Or relearn it in the case of coming back to a similar exercise a year later).

Any Update :/?

The link I gave in post #4 gives you the instructions on how to decipher this value.

I have several parameters to check for more than 55 curtain walls and the position of “Fonction” is not allows the same.
I have 5 other parameters with the same issue (structure…) and the parameters I have to check are read from an Excel List. I don’t know how can I use your script for this situation, and it could be really heavy is I have to use a dictionary for each case.

If the value is exterior, change it to the correct integer (1). If the value is interior, change it to the correct integer (0), and on and on. You can do this with an if statement in either excel or in dynamo.

You cannot use any values other than 0-5 to accomplish what you are after.

A dictionary would actually be a pretty good option.
You could also set this up in your Excel file before ever even opening Dynamo…

  1. Add a new column for Function Value (or whatever you want to call it.)
  2. Use conditional statements to set the appropriate value depending on the text parameter Function you already have (essentially making a dictionary in Excel.)
  3. Use Function Value when importing data to Dynamo instead of Function (so that it’s already in the correct format.)

I have found a more optimal solution :slight_smile:
Thanks for your help !