Created
June 13, 2020 12:49
-
-
Save chuongmep/c27a090459eeb777ff62d3d5788dd87b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Reference Reference(Element Familyinstance) | |
{ | |
FamilyInstance familyInstance = (FamilyInstance)Familyinstance.InternalElement; | |
Options options = new Options(); | |
options.ComputeReferences = true; | |
options.IncludeNonVisibleObjects = true; | |
var result = familyInstance.get_Geometry(options) | |
.OfType<Autodesk.Revit.DB.Point>() | |
.FirstOrDefault(); | |
if (result == null) return null; | |
return result.Reference; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment