#! python3 # add modification date/notes to the document properties of the four first-pass modified models import os, json, traceback import Rhino BASE = r"D:\★Pier 자료\프로그램\Pier_T\검토파일" FILES = [ os.path.join(BASE, "철근 모델랑 운곡교P1_바이브코딩", "운곡교p1_수정_20261023.3dm"), os.path.join(BASE, "검토_산외교P1", "산외교P1 G5_수정_20261023.3dm"), os.path.join(BASE, "검토_옥성교P1", "옥성교P1_G5_수정_20261023.3dm"), os.path.join(BASE, "Ramp-A교P1", "ramp-A G5_수정_20261023.3dm"), ] OUT = r"C:\Users\User\AppData\Local\PierApp\jobs\c1_work\c1_stamp.json" res = {} try: for p in FILES: doc = Rhino.RhinoDoc.OpenHeadless(p) n0 = doc.Objects.Count doc.Strings.SetString("수정일", "2026-10-23") doc.Strings.SetString("수정내용", "C-1 bend radius to KDS 24 14 21 Table 4.5-1 (footing bars held, P3 rings / complex bars not changed)") tmp = p + ".tmp.3dm" ok = bool(doc.WriteFile(tmp, Rhino.FileIO.FileWriteOptions())) doc.Dispose() if ok: os.replace(tmp, p) res[p] = {"objects": n0, "saved": ok} except Exception: res["error"] = traceback.format_exc() res["done"] = True json.dump(res, open(OUT, "w", encoding="utf-8"), ensure_ascii=False, indent=1)