Set wall top constraint to unconnected

Hello guys,

I’m quite new to Dynamo, trying to create a simple graph.
I want to change all wall top constraints to unconnected (due to an error in groups, let’s not get into it… :slight_smile: )
I searched here and found a lot of discussions but didn’t find a solution.

I thought it would be simple: set pararmeter value by name, and that’s it?

But for some reason Dynamo says that there is no parameter with this name, even though when i try to “Get parameter values by name” it does find it… Seems pretty unlogical…

I’m working with Dynamo 2.0.1.

What am I missing?

Thanks a lot!

Yael

** The yellow error says “Warning: Element.SetParameterByName operation failed.
No parameter found by that name.”

When you are writing a string in code block you use " not when you are in a string block…
image

Thanks Jonathan!
Beginner’s mistake I guess… But I tried without it and it gives me another error - “The parameter’s storage type is not a string.”.
I tried linking a code block instead of string and I also get “The parameter’s storage type is not a string.”

That is most likely because the “type” called “Top Constraint” is not stored as a string, it is most likely stored as integers… (so -1 would mean "Unconnected) 0 would mean bottom, 1 would mean top etc (or along that logic).

Try feeding it with -1

Thanks again!

  1. should I write -1 in the string?
  2. Did you mean it should be instead of the name or the value? (“top constraint” or “unconnected”)?

In the value to not write a string but a integer (in a code block simply write -1) it will be blue and thus a number (which are of the type either integer (for whole numbers e.g 1) or doubles for e.g. 1.33)

Now I get “The parameter’s storage type is not a number.”

give me a second to power up dynamo and revit and I’ll show you how to determine what type is needed.

Thanks so much!

This is where I got so far:

image

1 Like

Nice one @m.rijsmus have not gotten any packages on my dyn 2.x yet :wink:

@YaelNetser if you want to do it yourself the parameter type is “ElementID” and the unconnected Id is -1001103

Thanks @m.rijsmus and @Jonathan.Olesen I’ll check out both answers.
This forum is so helpful! Thanks so much.

@m.rijsmus Worked Like magic! cool. thanks again

Remember to mark the post by @m.rijsmus as the solution to keep the forum tidy :slight_smile:
image

1 Like

Unfortunately, when trying to run this graph on a file that contains walls inside groups, I was asked to ungroup them. I was hoping that editing via Dynamo will work differently than trying within Revit, seems like I was too optimistic.

Have a look in this post… Though it will require some more work :slight_smile:

You can grab elements inside of a model group and filter out the walls. Here is the python code, original code and credit goes to Archi-lab. I just modified the python code to look for model groups rather detail groups (highlighted in the box).
Hope this helps!

3 Likes

Thanks @patrick_podeyn ! I’ll try this

1 Like