I have walls coming in through the API with the top constraint set to level 2 but I want it to be set to Unconnected. I have found how to do this after the wall was created but it leaves it at the height as if it was constrained to level 2. I was wondering if there was a way through the API to change the top constraint before the wall was created or revert it back to the shape of it's profile. Below is the code I'm using to change the top constraint.
newWall = Wall.Create(doc, profile, wall_type.Id, levelId, false, normal);
Parameter top_constraint_param = newWall.get_Parameter(BuiltInParameter.WALL_HEIGHT_TYPE);
top_constraint_param.Set("Unconnected");
top_constraint_param.SetValueString("Unconnected");
top_constraint_param.Set(ElementId.InvalidElementId);
I believe this method would limit me to rectangular walls which I would like to avoid. Please correct me if I'm wrong.
More info: I don't have the issue if I use the default architecture template but I do if I use the default construction template. If I manually make a wall and take off the top constraint on it, it is no longer a problem after that. I would like to find a way to remove the top constraint through the API though so that all walls I import come in following the profile they are given.
Can't find what you're looking for? Ask the community or share your knowledge.