Wall Top Constraint Before Creation

Wall Top Constraint Before Creation

Anonymous
Not applicable
707 Views
3 Replies
Message 1 of 4

Wall Top Constraint Before Creation

Anonymous
Not applicable

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);

0 Likes
708 Views
3 Replies
Replies (3)
Message 2 of 4

sonicer
Collaborator
Collaborator


what about use this.

 

Wall.Create(
	Document document,
	Curve curve,
	ElementId wallTypeId,
	ElementId levelId,
	double height,
	double offset,
	bool flip,
	bool structural)
0 Likes
Message 3 of 4

Anonymous
Not applicable

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.

0 Likes
Message 4 of 4

Anonymous
Not applicable

The answer I posted in the top comment plus changing the height of the wall after seems to be working.

0 Likes