Hello
I’m trying to identify flow direction in a 3D view. So I created two tags (one pointing left and one pointing right). but which one to put depends on the direction of flow and the reading direction of the tag.
In the view plan it’s just make the relation with the X and Y of the direction vector of the flow. In the 3D view i’m trying to pull the vector onto the plane thar represents the direction of the view.
I user the node Transform, but (apparently) the vector is still related to the Identity coordinate system. What I want is get vector only with X and Y terms, so would be related with the view coordinate system.
The python script is this:
# Carregar as bibliotecas DesignScript e padrão do Python
import sys
import clr
clr.AddReference("RevitNodes")
clr.AddReference("RevitAPI")
clr.AddReference("ProtoGeometry")
import Autodesk
import Revit
from Autodesk.Revit.DB import *
from Autodesk.DesignScript.Geometry import*
clr.AddReference('RevitServices')
clr.ImportExtensions(Revit.GeometryConversion)
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
viewDirection = doc.ActiveView.ViewDirection
viewPlane=Plane.ByOriginNormal(doc.ActiveView.Origin.ToPoint(),viewDirection.ToVector())
cs=CoordinateSystem.ByPlane(viewPlane)
OUT = cs
If anyone can help with the Transform node (or another that accomplish what i’m trying to do) , I appreciate it