Question for Matching AnalyticalMember and FamilyInstance

Question for Matching AnalyticalMember and FamilyInstance

powerstrong
Contributor Contributor
249 Views
2 Replies
Message 1 of 3

Question for Matching AnalyticalMember and FamilyInstance

powerstrong
Contributor
Contributor

I want to know some AnalyticalMember's properties. (for example, YZ_JUSTIFICATION)

I found that these properties are in FamilyInstance's parameters, by using RevitLookUp

Thank you Naveen and Jeremy 🙂

https://forums.autodesk.com/t5/revit-api-forum/how-to-get-yz-justification-in-revit-api-2023/m-p/113...

 

I can get list of AnalyticalMember by this :

 

AnalyticalModels = new FilteredElementCollector(RvtDoc).OfClass(typeof(AnalyticalElement)).ToElements();

 

And list of FamilyInstance by this :

 

var elements = new FilteredElementCollector(revitDoc)
 .OfClass(typeof(FamilyInstance))
 .WhereElementIsNotElementType()
 .Cast<FamilyInstance>()
 .ToList();

 

 

Now I want to get FamilyInstance from AnalyticalMember(AnalyticalElement).

I spent several hours to find relation with two data, but don't know.

Can anyone help me?

0 Likes
Accepted solutions (1)
250 Views
2 Replies
Replies (2)
Message 2 of 3

RPTHOMAS108
Mentor
Mentor
Accepted solution

In 2023 if the element has been given an association via:
AnalyticalToPhysicalAssociationManager.AddAssociation

 

Then it can be found via:
AnalyticalToPhysicalAssociationManager.GetAssociatedElementId

 

I believe this method works both ways i.e. on both the analytical or the physical as the parameter.

Message 3 of 3

powerstrong
Contributor
Contributor

@RPTHOMAS108 

OMG!

You solved the problem. Thank you so much 😁

0 Likes