[solved] How test and manipulate family instance by id?

FacingOrientation is both a node in Dynamo and the name of a property in the Revit API which is why it works.

Thank Cgartland, you give me the ultimate indice :smile:
REVIT API / Location Class


code :

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

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument

#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN

#var
moa = []
test = "false"
param = []
# ############################### #
# procedure #
# ############################### #
idelem = "13974"

id = ElementId(int(idelem))

element = doc.GetElement(id)
element = UnwrapElement(element)

if element :
    test = "true"

vec=element.FacingOrientation
position=element.Location.Point
origi=doc.GetElement(id).Location.Point
#position=element.Point.ToPoint()

moa.append([element, test, vec, position, origi])

#Assign your output to the OUT variable.
OUT= moa
1 Like