Hello Dynos,
how can i access the “flipp” of families? Is there a package? or maybe any python stuff?
I mean just to use “Space” via dynamo.
Kind regards
Andreas
how can i access the “flipp” of families? Is there a package? or maybe any python stuff?
I mean just to use “Space” via dynamo.
Kind regards
Andreas
How can I access the flip control type? I’m trying this script but it’s not working on the families I selected import clr
clr.AddReference(‘RevitAPI’)
from Autodesk.Revit.DB import *
clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
def Mirror_element(item):
try:
# Get the location of the FamilyInstance (assuming it’s a FamilyInstance)
location = item.Location
# Ensure the item has a valid location (should be a FamilyInstance)
if isinstance(location, LocationPoint):
# Get the point of the FamilyInstance's location (center point)
family_center = location.Point
# Define the mirror line based on the center of the FamilyInstance, using the internal X-axis (basis X)
# Mirror line runs along the Y-Z plane at X = family_center.X
mirror_line = Line.CreateBound(XYZ(family_center.X, 0, 0), XYZ(family_center.X, 1, 0)) # Vertical line along the Y-axis
# Perform the mirror operation on the element
ElementTransformUtils.MirrorElement(doc, item.Id, mirror_line)
return True
else:
return False # Not a valid FamilyInstance location
except Exception as e:
return False # Handle errors gracefully
doc = DocumentManager.Instance.CurrentDBDocument
items = UnwrapElement(IN[0])
TransactionManager.Instance.EnsureInTransaction(doc)
if isinstance(IN[0], list):
OUT = [Mirror_element(x) for x in items]
else:
OUT = Mirror_element(items)
TransactionManager.Instance.TransactionTaskDone()
better start a new topic! and paste your code in </>
# 🏗️ do something
OUT = "OK!"