I’m running into issues here. I’m trying to get the coordinates from 1m away.
Project is a lot of columns that is rotated slightly different along a 1km path. I need to give the contractor this coordinate aswell as the location (Center of column, which is easy enough) so that they can determin the rotation it should stand in in the real world.
I feel like im not able to get a vector of the column direction, so i tried creating a model line in the family to see if i would be able to catch this through dynamo/python. But with no succes.
Anyone have an idea on how to achieve this?
Hi @obeXS9VY you could try with aligned boundingbox, get the faces from them, and get the normal, and use that for translate the point…maybe 
Another option may be to change column style to Angle driven; as below this will provide a ‘Cross-section rotation’ parameter.
Problem with that is that i cant control wich side of the boundingbox gets be the front. So when the column is turned more than a certain point it gets to be another side i need.
allright, i just mean something here…can maybe work…a very fast one 
Is the crossrotation always in relation to the internal coordinate system? Feel like this is more of a rotation around it self even tho im not sure. Never really understood that.
I think it’s based on Project North:
The clockwise rotation angle of a slanted column (viewed from top to base). This angle can be carried out to 3 decimal places. Negative numbers rotate counterclockwise. If a slanted column is in a vertical state, then this rotation is measured from Project North. Otherwise, it is measured from the vertical position.
I’ve tried copying your script. It is not based on the front/backside of the column. Easier to see in my project cause the column is not symetrical. Don’t know why im gettting 2 points tho.
Do you have an idea to fix that? Thats where im running in to problems most of the time.
arhh i see…another there probably could work get the families reference itself then…front/back and use that…maybe…genius loci should have some nodes for that
Hi @obeXS9VY , can share the family? so that forum members can try a solution
and a way with the family reference itself maybe
Standard Scepter.rfa (852 KB)
This is the family. But its pretty simpel. Just a column that is not symetrical.
How are you retrieving the reference plane of the family in the pythonscript?
as mention, genius loci have family reference nodes for that you can try
solution using FacingOrientation property (Your family is oriented along the Y-axis)
import clr
import sys
import System
#
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
import Autodesk.DesignScript.Geometry as DS
#import Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
import Autodesk.Revit.DB as DB
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
#import transactionManager and DocumentManager (RevitServices is specific to Dynamo)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
toList = lambda x : x if hasattr(x, "__iter__") and not isinstance(x, (str, System.String)) else [x]
#Preparing input from dynamo to revit
lstelems = toList(UnwrapElement(IN[0]))
out = []
for e in lstelems:
e : DB.FamilyInstance
pt_loc : DB.XYZ = e.Location.Point
# offset -1m to Y axis
pt_offset = pt_loc - (e.FacingOrientation.Multiply(3.28084))
out.append(pt_offset.ToPoint())
OUT = out
I think this is the simplest. And seems to be working for me. Thank you.