- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am trying to get the global coordinates? (Revit model space coordinates?) of the start and end points of an Edge (selected by the user).
I can get the points just fine if the selected edge is a system family (duct, pipe, etc.). The trouble is when the user selects a family instance (Mechanical, Electrical equipment etc.). After a while of trouble shooting I realized that the edge start and end coordinates being reported to me when a user selects a family instance edge were based on the family's local coordinate system. From there I started searching for a way to convert those points to the revit project coordinate system - or whatever system the ducts or pipes are using. I found several examples that steered me in the right direction (I think). But I have not been able to get anything to work for my particular case.
Examples:
http://thebuildingcoder.typepad.com/blog/2009/03/transform-instance-coordinates.html
http://thebuildingcoder.typepad.com/blog/2011/06/get-transformed-family-instance-geometry.html
http://thebuildingcoder.typepad.com/blog/2012/03/retrieve-geometry-in-element-coordinate-system.html
These examples make it clear to me that I need to be dealing with the GeometryInstance class. What I cannot figure out is how to incorporate the selected Edge of a family instance, and then get the start and end point of that edge (in the global coordinate system).
Thanks!
C#, Revit 2016
Solved! Go to Solution.