Getting Revit Shared Site Information (internal / <Not Shared> state of the revit link instance)

I would like to to get the shared site information or a Revit Link through the Revit API. I am not looking to get any number of coordinates though. I only want to know if my link is Not Shared (without shared coordinates) or internal (with shared coordinates on the “internal” site name location).

The RevitLinkInstance Class only has three methods GetLinkDocument, MoveBasePointToHostBasePoint and MoveOriginToHostOrigin. However, none of these three is reporting Link’s current shared site information.

Methods similar to the one below:


…getting the document Project Location Name do not work for me as those names are independent from the state of the link file, whether it is Shared (move instance to) or Not Shared (do not share site of selected instance).

In some circumstances where many buildings live in the same site model, some of them need to follow their internal site according to the survey point, some of them need to be change. I would like to make sure by dynamo that specific files retained their internal site position.

Any help will be appreciated.

Regards,
Alexandros

I just find the answer accidentally; The state of the location is included in the Revit Link Instance Name. The Revit Link instance Name is always in the form of “RevitLinkName.rvt : NumberOfInstanceInTheProject : StateOfLinkInstance”.