round_to_window_slot_duct_t.../python/show_constraints.py

20 lines
574 B
Python
Raw Normal View History

2026-04-12 15:52:08 -07:00
#
# 3/23/26 ChatGPT
# shows details of constraints
#
sk = App.ActiveDocument.ActiveObject
App.Console.PrintMessage("Constraint Listing:\n")
print(f'Constraint Listing: ')
for i, c in enumerate(sk.Constraints):
App.Console.PrintMessage(f"\nConstraint {i}: {c.Type}")
if hasattr(c, "Value") and c.Value != 0:
App.Console.PrintMessage(f" = {c.Value}")
App.Console.PrintMessage(
f"\n First : Geo {c.First}, Pos {c.FirstPos}"
f"\n Second: Geo {c.Second}, Pos {c.SecondPos}"
f"\n Third : Geo {c.Third}, Pos {c.ThirdPos}\n"
)