I need to record the position of my revit links using python or any Dynamo node, like the image bellow:
Then I have to duplicate the positions and create the same number of buildings.
So, after all, I’ll have all my buildings matching name with positions
I tried to find any way to do this using Dynamo nodes, but I didn’t find any.
I tried to find a way to write a python script to solve this, but, as I’m not a programmer, I’m getting a bit confused with the translation from C# API methods, found on API’s documentation, to Python scripting.
I found out this method that may solve my issue, but I’m not understanding how to use it. It requires an instance of ISaveSharedCoordinatesCallback, and I have no idea of how to set this.
If someone knows how to use this method or any other method that halps me, I would be thank for good.
By the way, I stated this python code:
import clr clr.AddReference('ProtoGeometry') from Autodesk.DesignScript.Geometry import * # Import ToDSType(bool) extension method clr.AddReference("RevitNodes") import Revit clr.ImportExtensions(Revit.Elements) # Import geometry conversion extension methods clr.ImportExtensions(Revit.GeometryConversion) # Import DocumentManager and TransactionManager clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager from System.Collections.Generic import * # Import RevitAPI clr.AddReference("RevitAPI") import Autodesk from Autodesk.Revit.DB import * #Get current document doc = DocumentManager.Instance.CurrentDBDocument uiapp = DocumentManager.Instance.CurrentUIApplication app = uiapp.Application uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument #setting variables linkins = UnwrapElement(IN) salvos =  #start transaction TransactionManager.Instance.EnsureInTransaction(doc) for link in linkins: linkDoc = link.GetLinkDocument() type = doc.GetElement(link.GetTypeId()) opt = SaveModifiedLinksOptions.SaveLinks type.SavePositions(opt) salvos.append(type) #end transaction TransactionManager.Instance.TransactionTaskDone() OUT = salvos