
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to write code that gives the x and y-coordinates of the bottom-left point of each room in the design, based on the length in millimetre. If for somehow the code sets the bottom-left corner of the design at (0,0) and then from there if wall surrounds all the inner space such that wall width is 290mm, then the first room at the bottom-left corner starts at (291,291) coordinates. The code reads all the rooms and returns the list of coordinates in (mm) for each of them.
I tried to use the following code to achieve this, however, I found some of the X and Y axes are in minus and moreover they are not in Millimetre, which is meaningless for my purpose.
Location loc = room.Location; LocationPoint lp = loc as LocationPoint; XYZ p = (null == lp) ? XYZ.Zero : lp.Point; msg.Add(room.Name + " - " + p.X + ", "+ p.Y);
The attached design explains the idea better.
Can someone help me with Revit API methods or any relevant material that could be useful for me to achieve this functionality?
Your help will be greatly appreciated.
Thanks in Advance
Kind Regards
Bilal
Solved! Go to Solution.