
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi guys, I'm a C# developer with little knowledge of Revit APIs. What I'm trying to do is to create a room starting from a series of "ModelLine" drawed by the user. Each wall is composed with various panels (which are instances of a family), each panel needs to be oriented to be parallel in respect of the drawed ModelLine, and everything is fine but I have a problem (the last one I hope).
The family instance origin is set to the top-left corner of the panel also the family was drawn so that the panel is horizontal if I open the RFA, when I rotate the panel is placed in the right position but outside the shape, as an example look at the picture below, the bottom and right panels are ok, the upper and left panels aren't because I rotate every panel to make them parallel to the drawn line (the blue polygon), if needed.
What I want to accomplish is shown below, where each panel is placed inside the shape. I think that I need to calculate a vector and move the rfa instance by the thickness of the panel, but:
How I can calculate the vector? and how I can know if I need to move the panel "inward" or "outward"? Sorry but my cad/math skills aren't so good so this question might be quite stupid to the eye of a professional Revit developer. Please also note that the shape can have different angles and shapes than an simple rectangle.
Thanks in advance for your help,
Umberto
Solved! Go to Solution.