Message 1 of 4

Not applicable
10-25-2016
11:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi API Community,
I've created a wall through the API it set the Top Constraint to Unconnected. I'd like to set the Top Constraint parameter to a level and remove the Unconnected Height. Is this possible? I haven't had any luck with my method.
public void CreateWall(Document doc, ObjWalls LinkedWall) { MyLibrary lib = new MyLibrary(); LocationCurve locationCurve = LinkedWall.WallCurve; List<Level> levels = lib.GetLevels(doc); Level BaseLevel = levels.Find(l => l.Name == LinkedWall.BaseConstraint); Level TopLevel = levels.Find(l => l.Name == LinkedWall.TopConstranit); XYZ startPoint = LinkedWall.startPoint; XYZ endPoint = LinkedWall.EndPoint; Line line = Line.CreateBound(startPoint, endPoint); Transaction t = new Transaction(doc); t.Start("Create Wall"); try { Wall wall = Wall.Create(doc, line, BaseLevel.Id, true); Parameter parm = wall.LookupParameter("Top Constraint"); parm.Set(TopLevel.Name); } catch { } t.Commit(); }
Solved! Go to Solution.