Community
Hello!
Can u please explain me how to compare shared coordinates between files and make sure that it is the same?
HI @Antipin_m
Kindly follow the below steps to compare shared coordinates between two files.
01. Open the both project documents.
UIDocument UIDoc = app.OpenAndActivateDocument(@"C:\DocStorage\Demo5.rvt");
02. Get Coordinates and compare.
UIDocument uiDoc_01 = app.OpenAndActivateDocument(@"C:\DocStorage\Demo5.rvt");
Autodesk.Revit.DB.Document doc_01 = uiDoc_01.Document;
BasePoint basePoint01 = new FilteredElementCollector(doc_01)
.OfCategory(BuiltInCategory.OST_SharedBasePoint)
.First() as BasePoint;
UIDocument uiDoc_02 = app.OpenAndActivateDocument(@"C:\DocStorage\Demo6.rvt");
Autodesk.Revit.DB.Document doc_02 = uiDoc_02.Document;
BasePoint basePoint02 = new FilteredElementCollector(doc_02)
.OfCategory(BuiltInCategory.OST_SharedBasePoint)
.First() as BasePoint;
//Get First Project Basepoint
XYZ position01 = basePoint01.SharedPosition;
//Get Second Project Basepint
XYZ position02 = basePoint02.SharedPosition;
//Compare the
if ((position01.X.Equals(position02.X) && position01.Y.Equals(position02.Y) &&
(position01.Z.Equals(position02.Z))))
{
TaskDialog.Show("Information", "Shared Coordinates of two projects are same");
}
Hope this will Helps 🙂
@Mohamed_Arshad. Hi!
Thank u so much.
But this method compares shared coordinates of the BasePoints, which can be different in files, which have shared coordinates.
Hi @Antipin_m
can please showcase with an example image that which you need to compare exactly with other projects
Can't find what you're looking for? Ask the community or share your knowledge.