Getting the phase map

Getting the phase map

cwaluga
Advocate Advocate
729 Views
4 Replies
Message 1 of 5

Getting the phase map

cwaluga
Advocate
Advocate

In Revit 2019 there is a nice function RevitLinkType.GetPhaseMap() which allows us to obtain the information on which phase maps to which in a linked document scenario. Is there any way to obtain this information in older versions?

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

FAIR59
Advisor
Advisor
Document link = linkElem.GetLinkDocument();

Dictionary<ElementId, ElementId> PhaseTable = new Dictionary<ElementId, ElementId>();
PhaseTable = link.GetPhaseMapping(doc);
0 Likes
Message 3 of 5

cwaluga
Advocate
Advocate

I don't seem to have the GetPhaseMapping method available in any version of Revit (see also here). Are you sure that this is not a non-standard extension method? If you have something that works I would appreciate if you could explain how you obtain the map. The only thing that comes to my mind is making assumptions like "Phase in host is equally named as in link", which may not hold true in any case.

0 Likes
Message 4 of 5

FAIR59
Advisor
Advisor

Yes sorry, it's an extension method I used to ask the user to "define" the mapping.  

Message 5 of 5

cwaluga
Advocate
Advocate

Haha, happens to all of usSmiley Happy! Nevertheless, thanks for the effort. I guess if you went that far to ask the user, you did also not find a good solution.

0 Likes