Hello All,
I am trying to query linked models to obtain their Shared Site settings in the links instance properties. My current approach is not yielding any results. See images and attached graph. Is this the correct approach, or should I be looking into a different method to obtain this information? Any help or advice would be greatly appreciated.
SI_RVTLinkSharedSite.dyn (3.8 KB)
Yes, so that parameter doesn’t really store any information. You will need to dig down into the linked document and pull the current active location:
OUT = UnwrapElement(IN[0]).GetLinkDocument().ActiveProjectLocation
Now, you can use that object to get what you need from it. Here’s a link to how to get XYZ info about that object.
It’s not a list so you can’t access it like one. First thing that comes back is Enumerable which means you can call a “for” loop on it:
for i in doc.ProjectLocations
or more pythonic:
[x for x in doc.ProjectLocations]
Now, what you will get back is a list of ProjectLocation objects. If you need their offsets like EastWest or NorthSouth you need to actually query their SiteLocation and since that is an indexer, it will need a point value as input called like this:
position = location.GetProj…
Thanks for pointing me in the right direction @Konrad_K_Sobon . With your help I was able to achieve the results I wanted. See image.
and to give back to the community here is the final graph: ReportRVTLinkSharedSite.dyn (4.6 KB)