
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
we have a plugin, that should adjust walls lines slightly (move them, rotate them a bit and also should adjust the length of the walls a bit).
With wall.Location.Move( xyzTranalation ) and wall.Location.Rotate(...) we could adjust the location and rotation of the walls, but not the length of the walls. So we decided to follow the approach, that is suggested on buildingcoder 10years ago:
https://thebuildingcoder.typepad.com/blog/2010/08/edit-wall-length.html
// get the current wall location LocationCurve wallLocation = myWall.Location as LocationCurve; // get the points XYZ pt1 = wallLocation.Curve.get_EndPoint( 0 ); XYZ pt2 = wallLocation.Curve.get_EndPoint( 1 ); // change one point, e.g. move 1000 mm on X axis pt2 = pt2.Add( new XYZ( 0.01 ), 0, 0 ) ); // create a new LineBound Line newWallLine = app.Create.NewLineBound( pt1, pt2 ); // update the wall curve wallLocation.Curve = newWallLine;
This seems to work fine for single walls. But fails in many cases the wall have hosted elements like windows and even in complex scenarios with multiple walls (Note: the movement is just very less about some mm!)
To show you, what I mean, I wrote a short macro embedded in the rvt that is attached.
The macro "LocationLineReset" just moves the wall inside the rvt by approx. 3mm using the suggested method from buildingcoder
The result is the following:
This seem like a not expected behavior. The windows is now located outside the wall although the wall have moved just about 3mm. Is this a bug?
If I use the second macro "ShiftWall", which just does a wall.LocationCurve.Move( new XYZ(0.01, 0.01,0) ) which is an equivalent translation to the former marco, the result is fine.
If their would be a method to adjust the length of the wall different to resetting the wall.LocationCurve.Curve = Line.CreateBound( ... ) like mentioned on the buildingcoder page, this would solve our issue as well. Is their any such method? I couldn't find a solution neighter in API forum, buildincoder nor google.
Thanks
Harald
Solved! Go to Solution.