I am trying to find the location of an element with respect to survey point but instead I am getting it w.r.t to project basepoint. Can someone help me to achieve it?
Project basepoint is rotated w.r.t true north also.
I am trying to find the location of an element with respect to survey point but instead I am getting it w.r.t to project basepoint. Can someone help me to achieve it?
Thanks. Let me have a look. It seems it finds distance between the 2 points.
Here is an example with Python
import sys
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#import Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
toList = lambda x : x if hasattr(x, '__iter__') else [x]
lst_DSPt = toList(IN[0])
out = []
for pt in lst_DSPt:
pt = pt.ToXyz()
#translate point from Internal to Shared coordinates
translatedpointB = doc.ActiveProjectLocation.GetTotalTransform().Inverse.OfPoint(pt)
out.append([translatedpointB.ToPoint().X, translatedpointB.ToPoint().Y, translatedpointB.ToPoint().Z])
OUT = out