pt.move-titleblock.py
# SUMMARY ##NOTE THERE ARE NOT INTERNAL ORIGINS IN FAMILIES SO DON"T TRY! # One-shot move per sheet (single undo): # 1) Optional run gate (IN[0]). # 2) Target sheets from IN[1] (supports wrapped ViewSheet(s), DB.ViewSheet(s), ElementId/int(s), or None/""). # 3) For each sheet, compute move vector = - (largest title block bbox Min) so TB bbox Min becomes (0,0). # 4) Collect ALL paper-space elements on the sheet. # 5) Exclude ONLY: # - Origin CAD marker imports (ImportInstance) whose name/type contains "origin" or "0,0,0"/"0,0-origin" # - ALL ScheduleSheetInstance elements (includes revision schedules) so they are NOT touched (prevents snap-back drift) # 6) Record pinned elements in the move set, unpin them, move in one shot, then re-pin. # 7) Try batch MoveElements; on binding failure, fall back to per-element MoveElement (still in same Transaction). # # INPUTS # IN[0] run (bool, optional): True/None/omitted -> run, Fal...