Is there a way to get the way a model was linked in?

So we have a site where all models should be linked in via shared coordinates, I want to run an audit on each model to see if any of the linked models has not been linked in via shared coordinates.

The only thing I can find is when you get the linked elementstype name you can see if the linked model is currently using the shared coordinate system.

Is there a better way of getting this information? Currently I am chopping up the string you get from the ElementType.Name node.

If they are linked in using the wrong method then shouldn’t the linked models end up in the wrong spot in the first place?

no as much, most of the models in a zone share the same origin point or project base point. If they need to move a building then we just change the coordinates of the models and they move.

What happens is some designers unload links and reload them when they want them back in and link them in incorrectly. they then sometimes are off by a few meters or millimeters depending on a move.

I am bit confused (maybe because i am tired), but unloading a model doesn’t change how the model is linked in the first place no?

Correct. Simply unloading or reloading does not change the link method or the coordinates of the link placement. If designers are deleting and relinking from scratch that’s a much bigger issue.

Here is an alterternative solution for you.
-Link all the models in correctly how you want.
-Place them all on a workset.
-Make yourself a new sync button which
1. Syncronizes the project
2. Checks out the all elements on the workset containing the linked models.

Just always use your sync button instead of the Revit button.
In this way the general users cannot modify the linked models position at all because Revit will tell
them that they need to request permission from you to do so.

I am unsure if specific element on worksets works, but as a workflow i use this for Templates, Object styles.

There is always a workaround, in this case any user could force relinquish all my elements and proceed but then if that happens i can justifyably take out the big whacky stick…

This would prevent updates, but…

While I don’t have data, in my time as a Designated Support Specialist we did see a correlation between corruption so sever we could not repair models and ‘maintaining ownership’ of worksets or elements in this way.

So proceed with caution.

A better method might be to simply track modifications - doesn’t take much either.

Start by checking to ensure they are properly located. Archive that model for reuse. Next take each link instance and pull the VersionGUID. This is a property of the model which will tell you which version of the document it was last modified in. Write the element’s UniqueID, ElementID, Transform, and VersionGUID to a CSV.

Any time you want to modify a link, or add a link, or otherwise change things, repeat the entirety of that process, writing to a new CSV.

From there write new script to get the Element using it’s GUID, and compare the version GUID to the value in the CSV. If it’s different, build the transform and automatically reposition the link instance.

If at any point the element GUID doesn’t return an element, you know a user has been deleting and recreating instead unloading the link. You can also track down which synch did the modification using a Binary search on synch instances (if you archive them all, or if you’re using the Design Collaboration module), by using the DocumentDifference class of the API (look for deleted elements).

EDIT: Should have clarified, this is the method to get a document difference element.

Also… While I have utilized this method successfully on standard elements, I have not tried it with link instances, which are unique in the document structure so you might see a LOT of changes in them (like every version) in some circumstances.