Extracting a named reference plane from FamilyInstance

Extracting a named reference plane from FamilyInstance

harilalmn
Advocate Advocate
618 Views
4 Replies
Message 1 of 5

Extracting a named reference plane from FamilyInstance

harilalmn
Advocate
Advocate

Dear All,
I have been struggling to extract a particular reference plane named "Aligned". I need to create a plane that is at exact orientation of the reference plane inside the FamilyInstance. I used the GetReferenceByName() method, as follows;

 

 

FamilyInstance familyInstance = doc.GetElement
(
uiDoc.Selection.PickObject(
Autodesk.Revit.UI.Selection.ObjectType.Element,
new FamilyInstanceFilter(),
"Select a family instance")
) as FamilyInstance;

Reference alignReference = familyInstance.GetReferenceByName("Aligned");

 

 

I saw several posts with solutions here, for creating dimensions using the GetReferenceByName(), but could not find one with solution to extract the plane.

How to do this?

0 Likes
619 Views
4 Replies
Replies (4)
Message 2 of 5

jeremy_tammik
Alumni
Alumni

The plane exists only in the family definition, so I doubt that you will be able to access it without opening your RFA, e.g., using EditFamily.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 5

RPTHOMAS108
Mentor
Mentor

Is the reference plane you are looking for set to 'Not a Reference' in family? Otherwise according to RevitAPI.chm (as I understand it) it should be able to find it.

0 Likes
Message 4 of 5

harilalmn
Advocate
Advocate

I am able to find the reference...

Here is the scenario. I have several families which when placed in project, are to be aligned to some walls. Each family has a reference plane named "Aligned". When placing, this reference plane has to align with the given wall, as if we do manual align in revit using "AL" shortcut. 

0 Likes
Message 5 of 5

harilalmn
Advocate
Advocate

SmartSelect_20231016_133822_Samsung Notes.jpg

Above shown is what I try to achieve...

 

I have several families and each family has different orientation for this reference plane. 

0 Likes