Project Position Returns Wrong value

I am trying to find the Project position value of the linked instances which returns wrong values , I tried with the current document and still in incorrect I am I missing something…I dont think it unit conversion.

import System
import clr
clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *
import Autodesk

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager

doc = DocumentManager.Instance.CurrentDBDocument


 #instancedoc = IN[0][1]



Origin = XYZ (0,0,0)


projectPosition = doc.ActiveProjectLocation.GetProjectPosition(Origin)
OUT = [doc.ActiveProjectLocation.Name,projectPosition.Angle, projectPosition.	EastWest,projectPosition.	NorthSouth]



Actual Values :
image

What i got :
image

Hello, the ratio of the 2 results is 304.8 (if you do the opposite you find the unit conversion elements in Mr. Poupin’s script, towards the last lines at the bottom (n-12))
You have to dig on this side, I think (but not with absolute certainty)

Cordially
christian.stan

Yes, it appears to be a unit / conversion issue.

3 Likes

Yes, it was indeed unit conversion. Thanks both of you.

Also, I couldn’t get the active project location of linked models. It always returned one of the shared site as it calls the documents first not sure if I can get active location from linked instance directly.

I had to filter the location of linked models with link Instance names to get active location, It would be interesting to know if there is way to do this.

Anyways, the question is resolved thanks again.

2 Likes