{
  "Uuid": "63be24d1-f2b7-5b5e-badc-b6397fc58703",
  "IsCustomNode": false,
  "Description": "Room Reading -> Revit: reads room_checked.json from the Room Reading tool (one room or several joined) and places walls, doors, windows, fixed elements and rooms on one level, with keep / strip / alter as phases. ELVTR AI for Architects, A3.",
  "Name": "room_to_revit_2027",
  "ElementResolver": {
    "ResolutionMap": {}
  },
  "Inputs": [
    {
      "Id": "e71541d28ea0451cbeaa3679fa2c3c2b",
      "Name": "1  room_checked.json",
      "Type": "string",
      "Type2": "string",
      "Value": "room_checked.json",
      "Description": "Allows you to select a file on the system and returns its file path"
    },
    {
      "Id": "8cf8b60ed1184d63ad6b306163dabf7f",
      "Name": "2  Level name (blank = name in the file)",
      "Type": "string",
      "Type2": "string",
      "Value": "",
      "Description": "Creates a string."
    },
    {
      "Id": "8bbc298c5f704973a740e377cdedfa28",
      "Name": "3  Place rooms and fixed elements",
      "Type": "boolean",
      "Type2": "boolean",
      "Value": "true",
      "Description": "Selection between a true and false."
    },
    {
      "Id": "919d31bfc0d34a0eb75d4131517f192b",
      "Name": "4  Keep / strip / alter as phases",
      "Type": "boolean",
      "Type2": "boolean",
      "Value": "true",
      "Description": "Selection between a true and false."
    },
    {
      "Id": "b949d07bdf7944f180fe9c5080fc86ba",
      "Name": "5  Run again: flip this, then Run",
      "Type": "boolean",
      "Type2": "boolean",
      "Value": "false",
      "Description": "Selection between a true and false."
    }
  ],
  "Outputs": [],
  "Nodes": [
    {
      "ConcreteType": "CoreNodeModels.Input.Filename, CoreNodeModels",
      "Id": "e71541d28ea0451cbeaa3679fa2c3c2b",
      "NodeType": "ExtensionNode",
      "Inputs": [],
      "Outputs": [
        {
          "Id": "e0fb05f008404b909ab81c9b96196287",
          "Name": "",
          "Description": "File Path",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Replication": "Disabled",
      "Description": "Allows you to select a file on the system and returns its file path",
      "HintPath": "",
      "InputValue": "room_checked.json"
    },
    {
      "ConcreteType": "CoreNodeModels.Input.StringInput, CoreNodeModels",
      "NodeType": "StringInputNode",
      "InputValue": "",
      "Id": "8cf8b60ed1184d63ad6b306163dabf7f",
      "Inputs": [],
      "Outputs": [
        {
          "Id": "4cc369015b9a4d7b9197524966ba5878",
          "Name": "",
          "Description": "String",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Replication": "Disabled",
      "Description": "Creates a string."
    },
    {
      "ConcreteType": "CoreNodeModels.Input.BoolSelector, CoreNodeModels",
      "NodeType": "BooleanInputNode",
      "InputValue": true,
      "Id": "8bbc298c5f704973a740e377cdedfa28",
      "Inputs": [],
      "Outputs": [
        {
          "Id": "7cfab34a6aad4b51aafe1da57573f615",
          "Name": "",
          "Description": "Boolean",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Replication": "Disabled",
      "Description": "Selection between a true and false."
    },
    {
      "ConcreteType": "CoreNodeModels.Input.BoolSelector, CoreNodeModels",
      "NodeType": "BooleanInputNode",
      "InputValue": true,
      "Id": "919d31bfc0d34a0eb75d4131517f192b",
      "Inputs": [],
      "Outputs": [
        {
          "Id": "d0e868bfe6614e4d990bbe0a7f0d10bf",
          "Name": "",
          "Description": "Boolean",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Replication": "Disabled",
      "Description": "Selection between a true and false."
    },
    {
      "ConcreteType": "CoreNodeModels.Input.BoolSelector, CoreNodeModels",
      "NodeType": "BooleanInputNode",
      "InputValue": false,
      "Id": "b949d07bdf7944f180fe9c5080fc86ba",
      "Inputs": [],
      "Outputs": [
        {
          "Id": "e4c72caf641442379c90cae430f78ae4",
          "Name": "",
          "Description": "Boolean",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Replication": "Disabled",
      "Description": "Selection between a true and false."
    },
    {
      "ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
      "NodeType": "PythonScriptNode",
      "Code": "# Room Reading -> Revit.  One script, two hosts:\r\n#   - Dynamo Python Script node (Revit 2025-26 CPython3, Revit 2027 PythonNet3)\r\n#   - pyRevit pushbutton (IronPython 2.7 / 3.4 or CPython 3)\r\n# ELVTR AI for Architects, Assignment 3 student tool.  Version 0.2.0.\r\n#\r\n# Reads room_checked.json from room_reading.py (one room or several joined rooms) and\r\n# places, on one level:\r\n#   walls (single-layer types EX_<thickness>mm), doors, windows, plain openings,\r\n#   fixed elements (fireplace, joinery, stair ...) as simple Generic Model blocks,\r\n#   rooms with their floor / wall / ceiling finishes, and room separation lines\r\n#   where the reading has no wall.\r\n# Keep / strip / alter become phases: everything is Existing; strip is demolished in the\r\n# phase after Existing (openings in a stripped wall go with it); alter is flagged in Comments.\r\n# Every element's Mark is its reading id (LOUNGE.W01) and its Comments start\r\n# \"ROOM-READING <id>\", followed by confidence, decision, structure and any hazard or\r\n# heritage rows, so a schedule by Mark walks the register against the model.\r\n# Re-running deletes what the last run placed (only elements carrying that tag) and\r\n# places everything again from the file.\r\n#\r\n# Dynamo inputs:  IN[0] path to room_checked.json\r\n#                 IN[1] level name (blank = the level in the file, or the level at that height)\r\n#                 IN[2] place rooms and fixed elements (true/false)\r\n#                 IN[3] keep/strip/alter as phases (true/false)\r\n#                 IN[4] run toggle - flip it to run again\r\n# pyRevit: the button asks for the file and runs with rooms, fixed elements and phases on.\r\n# Plain Python that runs in Python 2.7 and 3: io.open, % formatting, list() around collections.\r\n\r\nimport io\r\nimport json\r\nimport math\r\n\r\nimport clr\r\nclr.AddReference(\"RevitAPI\")\r\nfrom Autodesk.Revit.DB import (BuiltInCategory, BuiltInParameter, CompoundStructure, CurveArray, CurveLoop,\r\n                               DirectShape, ElementId, FamilySymbol, FilteredElementCollector,\r\n                               GeometryCreationUtilities, GeometryObject, Level, Line, MaterialFunctionAssignment,\r\n                               SketchPlane, ViewFamily, ViewFamilyType, ViewPlan, Wall, WallKind, WallType, XYZ)\r\nfrom Autodesk.Revit.DB.Structure import StructuralType\r\nfrom System.Collections.Generic import List\r\n\r\nHOST = \"dynamo\" if \"IN\" in globals() else \"pyrevit\"\r\nif HOST == \"dynamo\":\r\n    clr.AddReference(\"RevitServices\")\r\n    from RevitServices.Persistence import DocumentManager\r\n    from RevitServices.Transactions import TransactionManager\r\n    doc = DocumentManager.Instance.CurrentDBDocument\r\nelse:\r\n    doc = __revit__.ActiveUIDocument.Document  # noqa: F821  (pyRevit provides __revit__)\r\n\r\nTAG = \"ROOM-READING\"\r\nAPP = \"RoomReading\"\r\nFT = 304.8            # millimetres per foot (Revit works internally in feet)\r\nVIEW_PREFIX = \"RR\"\r\nreport = []\r\n\r\n\r\ndef say(msg):\r\n    report.append(msg)\r\n\r\n\r\ndef ft(mm):\r\n    return float(mm) / FT\r\n\r\n\r\ndef xyz(p, z=0.0):\r\n    return XYZ(ft(p[0]), ft(p[1]), float(z))\r\n\r\n\r\ndef set_text(el, bip, value):\r\n    try:\r\n        prm = el.get_Parameter(bip)\r\n        if prm is not None and not prm.IsReadOnly:\r\n            prm.Set(u\"%s\" % value)\r\n            return True\r\n    except Exception:\r\n        pass\r\n    return False\r\n\r\n\r\ndef mark(el, eid, extra=\"\"):\r\n    set_text(el, BuiltInParameter.ALL_MODEL_MARK, eid)\r\n    set_text(el, BuiltInParameter.ALL_MODEL_INSTANCE_COMMENTS, (TAG + \" \" + eid + \" \" + extra).strip())\r\n\r\n\r\n# ---------- pure geometry (mm) ----------\r\ndef seg_len(a, b):\r\n    return math.hypot(b[0] - a[0], b[1] - a[1])\r\n\r\n\r\ndef inside(pt, poly):\r\n    x, y, c = pt[0], pt[1], False\r\n    j = len(poly) - 1\r\n    for i in range(len(poly)):\r\n        xi, yi = poly[i]\r\n        xj, yj = poly[j]\r\n        if (yi > y) != (yj > y) and x < (xj - xi) * (y - yi) / ((yj - yi) or 1e-12) + xi:\r\n            c = not c\r\n        j = i\r\n    return c\r\n\r\n\r\ndef interior_point(poly):\r\n    \"\"\"A point inside the polygon: centroid if inside, else midpoint of the widest horizontal chord.\"\"\"\r\n    n = len(poly)\r\n    a = sum(poly[i][0] * poly[(i + 1) % n][1] - poly[(i + 1) % n][0] * poly[i][1] for i in range(n)) / 2.0\r\n    if abs(a) > 1e-6:\r\n        cx = sum((poly[i][0] + poly[(i + 1) % n][0]) * (poly[i][0] * poly[(i + 1) % n][1] - poly[(i + 1) % n][0] * poly[i][1]) for i in range(n)) / (6 * a)\r\n        cy = sum((poly[i][1] + poly[(i + 1) % n][1]) * (poly[i][0] * poly[(i + 1) % n][1] - poly[(i + 1) % n][0] * poly[i][1]) for i in range(n)) / (6 * a)\r\n        if inside((cx, cy), poly):\r\n            return (cx, cy)\r\n    ys = sorted(set(p[1] for p in poly))\r\n    best = None\r\n    for k in range(len(ys) - 1):\r\n        y = (ys[k] + ys[k + 1]) / 2.0\r\n        xs = []\r\n        for i in range(n):\r\n            (x1, y1), (x2, y2) = poly[i], poly[(i + 1) % n]\r\n            if (y1 > y) != (y2 > y):\r\n                xs.append(x1 + (y - y1) * (x2 - x1) / (y2 - y1))\r\n        xs.sort()\r\n        for m in range(0, len(xs) - 1, 2):\r\n            w = xs[m + 1] - xs[m]\r\n            if best is None or w > best[0]:\r\n                best = (w, ((xs[m] + xs[m + 1]) / 2.0, y))\r\n    return best[1] if best else poly[0]\r\n\r\n\r\ndef uncovered(p, q, walls, tol_extra=25.0, min_len=100.0):\r\n    \"\"\"Parts of the room edge p-q that do NOT run along a wall (centreline or face).\"\"\"\r\n    L = seg_len(p, q)\r\n    if L < min_len:\r\n        return []\r\n    ux, uy = (q[0] - p[0]) / L, (q[1] - p[1]) / L\r\n    covered = []\r\n    for w in walls:\r\n        a, b = w[\"start\"], w[\"end\"]\r\n        wl = seg_len(a, b)\r\n        if wl < 1:\r\n            continue\r\n        wx, wy = (b[0] - a[0]) / wl, (b[1] - a[1]) / wl\r\n        if abs(ux * wy - uy * wx) > 0.02:          # not parallel\r\n            continue\r\n        off = abs((a[0] - p[0]) * (-uy) + (a[1] - p[1]) * ux)\r\n        if off > float(w.get(\"thickness\") or 110) / 2.0 + tol_extra:\r\n            continue\r\n        t1 = (a[0] - p[0]) * ux + (a[1] - p[1]) * uy\r\n        t2 = (b[0] - p[0]) * ux + (b[1] - p[1]) * uy\r\n        lo, hi = max(0.0, min(t1, t2)), min(L, max(t1, t2))\r\n        if hi > lo:\r\n            covered.append((lo, hi))\r\n    covered.sort()\r\n    gaps, t = [], 0.0\r\n    for lo, hi in covered:\r\n        if lo > t:\r\n            gaps.append((t, lo))\r\n        t = max(t, hi)\r\n    if t < L:\r\n        gaps.append((t, L))\r\n    return [((p[0] + ux * a, p[1] + uy * a), (p[0] + ux * b, p[1] + uy * b)) for a, b in gaps if b - a >= min_len]\r\n\r\n\r\ndef prefix(eid):\r\n    \"\"\"'LOUNGE.D03' -> 'LOUNGE'; 'D03' -> ''.\"\"\"\r\n    s = str(eid)\r\n    return s.rsplit(\".\", 1)[0] if \".\" in s else \"\"\r\n\r\n\r\ndef room_side(o, w, rooms):\r\n    \"\"\"Unit normal of wall w pointing into the room this opening was read from (None if unknown).\"\"\"\r\n    a, b = w[\"start\"], w[\"end\"]\r\n    L = seg_len(a, b) or 1.0\r\n    ux, uy = (b[0] - a[0]) / L, (b[1] - a[1]) / L\r\n    nx, ny = -uy, ux\r\n    pre = prefix(o.get(\"id\", \"\"))\r\n    cands = [r for r in rooms if prefix(r.get(\"id\", \"\")) == pre] or rooms\r\n    mid = ((a[0] + b[0]) / 2.0, (a[1] + b[1]) / 2.0)\r\n    best = None\r\n    for r in cands:\r\n        poly = r.get(\"polygon\") or []\r\n        if len(poly) < 3:\r\n            continue\r\n        ip = interior_point(poly)\r\n        d = (ip[0] - mid[0]) * nx + (ip[1] - mid[1]) * ny\r\n        dist = seg_len(ip, mid)\r\n        if best is None or dist < best[0]:\r\n            best = (dist, d)\r\n    if best is None or abs(best[1]) < 1:\r\n        return None\r\n    return (nx, ny) if best[1] > 0 else (-nx, -ny)\r\n\r\n\r\n# ---------- Revit lookups ----------\r\ndef ename(e):\r\n    \"\"\"Type names: .Name is not readable on every element type in every Python engine.\"\"\"\r\n    try:\r\n        return e.Name\r\n    except Exception:\r\n        pass\r\n    for bip in (BuiltInParameter.SYMBOL_NAME_PARAM, BuiltInParameter.ALL_MODEL_TYPE_NAME):\r\n        try:\r\n            prm = e.get_Parameter(bip)\r\n            if prm is not None and prm.AsString():\r\n                return prm.AsString()\r\n        except Exception:\r\n            pass\r\n    return \"\"\r\n\r\n\r\ndef fname(s):\r\n    try:\r\n        return s.FamilyName or \"\"\r\n    except Exception:\r\n        return \"\"\r\n\r\n\r\ndef all_of(cls):\r\n    return list(FilteredElementCollector(doc).OfClass(cls))\r\n\r\n\r\ndef get_level(name, elevation_mm, exact=False):\r\n    levels = all_of(Level)\r\n    for lv in levels:\r\n        if lv.Name == name:\r\n            return lv, False\r\n    if not exact:                       # a template's \"Level 1\" at the same height beats a duplicate level\r\n        for lv in levels:\r\n            if abs(lv.Elevation - ft(elevation_mm)) < 0.005:\r\n                return lv, False\r\n    lv = Level.Create(doc, ft(elevation_mm))\r\n    try:\r\n        lv.Name = name\r\n    except Exception:\r\n        say(\"level name '%s' could not be set; Revit named it '%s'\" % (name, lv.Name))\r\n    return lv, True\r\n\r\n\r\ndef phases():\r\n    ph = list(doc.Phases)\r\n    ex = None\r\n    for p in ph:\r\n        if p.Name.strip().lower() == \"existing\":\r\n            ex = p\r\n    if ex is None and len(ph) > 1:\r\n        ex = ph[0]\r\n    nxt = None\r\n    if ex is not None:\r\n        k = [p.Name for p in ph].index(ex.Name)\r\n        if k < len(ph) - 1:\r\n            nxt = ph[k + 1]\r\n    return ex, nxt, ph[-1]\r\n\r\n\r\ndef base_wall_type():\r\n    basics = [t for t in all_of(WallType) if t.Kind == WallKind.Basic]\r\n    for t in basics:\r\n        if ename(t).startswith(\"Generic\"):\r\n            return t\r\n    return basics[0] if basics else None\r\n\r\n\r\n_wall_types = {}\r\n\r\n\r\ndef wall_type(thk):\r\n    name = \"EX_%dmm\" % int(round(thk))\r\n    if name in _wall_types:\r\n        return _wall_types[name]\r\n    for t in all_of(WallType):\r\n        if ename(t) == name:\r\n            _wall_types[name] = t\r\n            return t\r\n    base = base_wall_type()\r\n    t = base.Duplicate(name)\r\n    cs = CompoundStructure.CreateSingleLayerCompoundStructure(MaterialFunctionAssignment.Structure, ft(thk),\r\n                                                              ElementId.InvalidElementId)\r\n    t.SetCompoundStructure(cs)\r\n    _wall_types[name] = t\r\n    return t\r\n\r\n\r\ndef symbols(cat):\r\n    return list(FilteredElementCollector(doc).OfClass(FamilySymbol).OfCategory(cat))\r\n\r\n\r\ndef sym_size(s):\r\n    w = h = None\r\n    for nm, bip in ((\"Width\", BuiltInParameter.FAMILY_WIDTH_PARAM), (\"Height\", BuiltInParameter.FAMILY_HEIGHT_PARAM)):\r\n        prm = s.LookupParameter(nm) or s.get_Parameter(bip)\r\n        v = prm.AsDouble() * FT if prm is not None else None\r\n        if nm == \"Width\":\r\n            w = v\r\n        else:\r\n            h = v\r\n    return w, h\r\n\r\n\r\nBIFOLD_WORDS = (\"bifold\", \"bi-fold\", \"bi fold\", \"folding\")\r\nGLAZED_WORDS = (\"glass\", \"glazed\", \"glazing\")\r\nDOUBLE_WORDS = (\"double\", \"pair\")\r\n_syms = {}\r\n\r\n\r\ndef symbol_for(kind, width, height, style=\"\"):\r\n    \"\"\"Nearest door/window type (preferring a bifold / glazed / double family when the reading says so),\r\n    duplicated to the read size when the family allows it.\"\"\"\r\n    cat = BuiltInCategory.OST_Doors if kind == \"door\" else BuiltInCategory.OST_Windows\r\n    tag = {\"bifold\": \"BF\", \"glazed\": \"G\", \"double\": \"DD\"}.get(style, kind[0].upper())\r\n    key = \"RR_%s_%dx%d\" % (tag, int(round(width)), int(round(height)))\r\n    if key in _syms:\r\n        return _syms[key], \"\"\r\n    cands = symbols(cat)\r\n    if not cands:\r\n        return None, \"\"\r\n    for s in cands:\r\n        if ename(s) == key:\r\n            _syms[key] = s\r\n            return s, \"\"\r\n    note = \"\"\r\n    words = {\"bifold\": BIFOLD_WORDS, \"glazed\": GLAZED_WORDS, \"double\": DOUBLE_WORDS}.get(style)\r\n    pool = cands\r\n    if words:\r\n        hit = [s for s in cands if any(k in (fname(s) + \" \" + ename(s)).lower() for k in words)]\r\n        if hit:\r\n            pool = hit\r\n        else:\r\n            note = \"no %s door family loaded, so a plain door stands in: load one and swap the type\" % style\r\n\r\n    def score(s):\r\n        w, h = sym_size(s)\r\n        return abs((w or 0) - width) + abs((h or 0) - height)\r\n    best = sorted(pool, key=score)[0]\r\n    try:\r\n        new = best.Duplicate(key)\r\n        ok = True\r\n        for nm, v in ((\"Width\", width), (\"Height\", height)):\r\n            prm = new.LookupParameter(nm)\r\n            if prm is None or prm.IsReadOnly:\r\n                ok = False\r\n                continue\r\n            prm.Set(ft(v))\r\n        if not ok:\r\n            say(\"%s: family '%s' has no editable Width/Height; its nearest size is used\" % (key, fname(best)))\r\n        s = new\r\n    except Exception as e:\r\n        say(\"%s: could not duplicate a type (%s); nearest type '%s' used\" % (key, e, fname(best)))\r\n        s = best\r\n    if not s.IsActive:\r\n        s.Activate()\r\n        doc.Regenerate()\r\n    _syms[key] = s\r\n    return s, note\r\n\r\n\r\ndef plan_view(level, phase, name):\r\n    for v in all_of(ViewPlan):\r\n        if not v.IsTemplate and v.Name == name:\r\n            return v\r\n    vft = [t for t in all_of(ViewFamilyType) if t.ViewFamily == ViewFamily.FloorPlan][0]\r\n    v = ViewPlan.Create(doc, vft.Id, level.Id)\r\n    try:\r\n        v.Name = name\r\n    except Exception:\r\n        pass\r\n    if phase is not None:\r\n        prm = v.get_Parameter(BuiltInParameter.VIEW_PHASE)\r\n        if prm is not None and not prm.IsReadOnly:\r\n            prm.Set(phase.Id)\r\n    return v\r\n\r\n\r\ndef remove_previous():\r\n    n = 0\r\n    ids = []\r\n    for cat in (BuiltInCategory.OST_Doors, BuiltInCategory.OST_Windows, BuiltInCategory.OST_SWallRectOpening,\r\n                BuiltInCategory.OST_GenericModel, BuiltInCategory.OST_Rooms, BuiltInCategory.OST_RoomSeparationLines,\r\n                BuiltInCategory.OST_Walls):\r\n        for e in FilteredElementCollector(doc).OfCategory(cat).WhereElementIsNotElementType():\r\n            prm = e.get_Parameter(BuiltInParameter.ALL_MODEL_INSTANCE_COMMENTS)\r\n            c = prm.AsString() if prm is not None else None\r\n            if c and c.startswith(TAG):\r\n                ids.append(e.Id)\r\n    for i in ids:\r\n        try:\r\n            doc.Delete(i)\r\n            n += 1\r\n        except Exception:\r\n            pass                        # already gone with its host wall\r\n    return n\r\n\r\n\r\n# Fixed-element block heights (mm) when the reading gives none. None = full ceiling height; 0 = not modelled.\r\nFIXED_H = {\"stair\": None, \"column\": None, \"riser\": None, \"lift\": None, \"chimney\": None,\r\n           \"fireplace\": 1200, \"joinery\": 900, \"kitchen\": 900, \"sink\": 900, \"bath\": 550, \"shower\": 50,\r\n           \"wet_area\": 20, \"void\": 0, \"other\": 900}\r\n\r\n\r\ndef block(poly, z0, h):\r\n    \"\"\"A Generic Model extrusion of the polygon (mm), as a DirectShape.\"\"\"\r\n    loop = CurveLoop()\r\n    pts = [xyz(p, z0) for p in poly]\r\n    for i in range(len(pts)):\r\n        p, q = pts[i], pts[(i + 1) % len(pts)]\r\n        if p.DistanceTo(q) > 1e-4:\r\n            loop.Append(Line.CreateBound(p, q))\r\n    loops = List[CurveLoop]()\r\n    loops.Add(loop)\r\n    solid = GeometryCreationUtilities.CreateExtrusionGeometry(loops, XYZ.BasisZ, ft(h))\r\n    ds = DirectShape.CreateElement(doc, ElementId(BuiltInCategory.OST_GenericModel))\r\n    try:\r\n        ds.ApplicationId = APP\r\n    except Exception:\r\n        pass\r\n    shape = List[GeometryObject]()\r\n    shape.Add(solid)\r\n    ds.SetShape(shape)\r\n    return ds\r\n\r\n\r\n# ---------- the run ----------\r\ndef run(path, level_override=\"\", do_rooms=True, do_phases=True):\r\n    try:\r\n        with io.open(path, \"r\", encoding=\"utf-8-sig\") as f:\r\n            data = json.load(f)\r\n    except Exception as e:\r\n        say(\"STOPPED: could not read %s (%s)\" % (path, e))\r\n        return\r\n    if not data.get(\"walls\"):\r\n        say(\"STOPPED: no walls in %s. Is this room_checked.json from room_reading.py?\" % path)\r\n        return\r\n\r\n    placed = {\"walls\": 0, \"doors\": 0, \"windows\": 0, \"openings\": 0, \"fixed elements\": 0, \"rooms\": 0,\r\n              \"separation lines\": 0}\r\n    proj = data.get(\"project\") or {}\r\n    lv_json = data[\"levels\"][0] if data.get(\"levels\") else {\"id\": \"L1\", \"name\": \"Level 1\", \"elevation\": 0}\r\n    removed = remove_previous()\r\n    if removed:\r\n        say(\"removed %d elements placed by the previous run\" % removed)\r\n    level, created = get_level(level_override or lv_json.get(\"name\") or \"Level 1\", lv_json.get(\"elevation\") or 0,\r\n                               exact=bool(level_override))\r\n    say((\"created\" if created else \"using\") + \" level '%s'\" % level.Name)\r\n    ph_ex, ph_next, ph_last = phases()\r\n    ceiling = lv_json.get(\"ceiling_height\") or 2700\r\n    if not lv_json.get(\"ceiling_height\"):\r\n        say(\"no ceiling height in the file: walls are 2700 high as a placeholder\")\r\n\r\n    # decisions: the file's own 'decision' fields first, then the register\r\n    ksa, flags = {}, {}\r\n    for r in data.get(\"register\", []):\r\n        els = [e for e in str(r.get(\"element\", \"\")).replace(\";\", \",\").replace(\" \", \",\").split(\",\") if e]\r\n        v = (r.get(\"keep_strip_alter\") or \"\").strip().lower()\r\n        cat = (r.get(\"category\") or \"\").strip().lower()\r\n        for el in els:\r\n            if v in (\"keep\", \"strip\", \"alter\"):\r\n                ksa[el] = v\r\n            if cat in (\"hazard\", \"heritage\"):\r\n                flags.setdefault(el, []).append(\"%s %s\" % (cat.upper(), r.get(\"id\", \"\")))\r\n    for k in (\"walls\", \"openings\", \"fixed\"):\r\n        for e in data.get(k, []):\r\n            v = (e.get(\"decision\") or \"\").strip().lower()\r\n            if v in (\"keep\", \"strip\", \"alter\"):\r\n                ksa[e[\"id\"]] = v\r\n            elif e.get(\"revit_phase\") == \"demolished\":\r\n                ksa[e[\"id\"]] = \"strip\"\r\n\r\n    def phase_it(el, eid, force_strip=False):\r\n        if ph_ex is not None:\r\n            prm = el.get_Parameter(BuiltInParameter.PHASE_CREATED)\r\n            if prm is not None and not prm.IsReadOnly:\r\n                prm.Set(ph_ex.Id)\r\n        v = \"strip\" if force_strip else ksa.get(eid, \"\")\r\n        if do_phases and v == \"strip\" and ph_next is not None:\r\n            prm = el.get_Parameter(BuiltInParameter.PHASE_DEMOLISHED)\r\n            if prm is not None and not prm.IsReadOnly:\r\n                prm.Set(ph_next.Id)\r\n        return v\r\n\r\n    def notes(eid, conf, v, extra=\"\"):\r\n        bits = [conf or \"\"]\r\n        if v:\r\n            bits.append(v.upper())\r\n        if extra:\r\n            bits.append(extra)\r\n        bits += flags.get(eid, [])\r\n        return \" | \".join(b for b in bits if b)\r\n\r\n    rooms_json = [r for r in data.get(\"rooms\", []) if len(r.get(\"polygon\") or []) >= 3]\r\n    walls_json = [w for w in data.get(\"walls\", []) if w.get(\"start\") and w.get(\"end\")]\r\n    walls = {}\r\n    for w in walls_json:\r\n        try:\r\n            a, b = w[\"start\"], w[\"end\"]\r\n            h = w.get(\"height\") or ceiling\r\n            wt = wall_type(w.get(\"thickness\") or 110)\r\n            el = Wall.Create(doc, Line.CreateBound(xyz(a, level.Elevation), xyz(b, level.Elevation)), wt.Id,\r\n                             level.Id, ft(h), 0.0, False, False)\r\n            v = phase_it(el, w[\"id\"])\r\n            st = (w.get(\"structure\") or \"\").strip().lower()\r\n            mark(el, w[\"id\"], notes(w[\"id\"], w.get(\"confidence\"), v, (\"structure \" + st) if st else \"\"))\r\n            walls[w[\"id\"]] = (el, w, v)\r\n            placed[\"walls\"] += 1\r\n        except Exception as e:\r\n            say(\"wall %s not placed: %s\" % (w.get(\"id\"), e))\r\n    doc.Regenerate()\r\n\r\n    swings = []\r\n    assumed = []\r\n    for o in data.get(\"openings\", []):\r\n        pair = walls.get(o.get(\"wall_id\"))\r\n        if pair is None:\r\n            say(\"opening %s skipped: its wall %s was not placed\" % (o.get(\"id\"), o.get(\"wall_id\")))\r\n            continue\r\n        el_w, w, wall_v = pair\r\n        with_wall = (wall_v == \"strip\")\r\n        try:\r\n            a, b = w[\"start\"], w[\"end\"]\r\n            L = seg_len(a, b)\r\n            ux, uy = (b[0] - a[0]) / L, (b[1] - a[1]) / L\r\n            t0 = float(o[\"offset\"])\r\n            t1 = t0 + float(o[\"width\"])\r\n            tm = (t0 + t1) / 2.0\r\n            mid = (a[0] + ux * tm, a[1] + uy * tm)\r\n            kind = o.get(\"type\", \"door\")\r\n            if kind == \"window\" and o.get(\"sill\") is None:\r\n                sill = 900.0                # placeholder: a window at floor level reads as a door\r\n                assumed.append(o[\"id\"])\r\n            else:\r\n                sill = float(o.get(\"sill\") or 0)\r\n            hgt = float(o.get(\"height\") or (2040 if kind == \"door\" else 1200))\r\n            if kind == \"opening\":\r\n                p1 = XYZ(ft(a[0] + ux * t0), ft(a[1] + uy * t0), level.Elevation + ft(sill))\r\n                p2 = XYZ(ft(a[0] + ux * t1), ft(a[1] + uy * t1), level.Elevation + ft(sill + hgt))\r\n                op = doc.Create.NewOpening(el_w, p1, p2)\r\n                mark(op, o[\"id\"], notes(o[\"id\"], o.get(\"confidence\"), ksa.get(o[\"id\"], \"\")))\r\n                placed[\"openings\"] += 1\r\n                continue\r\n            style = \"\"\r\n            if kind == \"door\":\r\n                if str(o.get(\"leaf\") or \"\").lower() == \"bifold\":\r\n                    style = \"bifold\"\r\n                elif o.get(\"glazed\"):\r\n                    style = \"glazed\"\r\n                elif int(o.get(\"leaves\") or 1) == 2:\r\n                    style = \"double\"\r\n            sym, note = symbol_for(kind, float(o[\"width\"]), hgt, style)\r\n            if sym is None:\r\n                say(\"opening %s skipped: no %s family loaded in this project\" % (o[\"id\"], kind))\r\n                continue\r\n            if note:\r\n                say(\"%s: %s\" % (o[\"id\"], note))\r\n            inst = doc.Create.NewFamilyInstance(xyz(mid, level.Elevation), sym, el_w, level, StructuralType.NonStructural)\r\n            if kind == \"window\":\r\n                prm = inst.get_Parameter(BuiltInParameter.INSTANCE_SILL_HEIGHT_PARAM)\r\n                if prm is not None and not prm.IsReadOnly:\r\n                    prm.Set(ft(sill))\r\n            n_in = room_side(o, w, rooms_json)\r\n            if n_in is not None:\r\n                # Where the element should face. Doors: the side they swing to (checked in Revit 2027,\r\n                # 25 Sep: stock M_Door families swing toward FacingOrientation). Windows: outwards.\r\n                if kind == \"door\":\r\n                    out = str(o.get(\"opens\") or \"\").lower() == \"out\"\r\n                    tx, ty = (-n_in[0], -n_in[1]) if out else n_in\r\n                else:\r\n                    tx, ty = -n_in[0], -n_in[1]\r\n                doc.Regenerate()\r\n                fo = inst.FacingOrientation\r\n                if fo.X * tx + fo.Y * ty < 0 and inst.CanFlipFacing:\r\n                    inst.flipFacing()\r\n            if kind == \"door\" and o.get(\"hinge\"):\r\n                swings.append(\"%s (hinge at the %s of %s)\" % (o[\"id\"], o[\"hinge\"], o[\"wall_id\"]))\r\n            v = phase_it(inst, o[\"id\"], force_strip=with_wall)\r\n            extra = \"goes with its wall\" if (with_wall and ksa.get(o[\"id\"]) != \"strip\") else \"\"\r\n            if o.get(\"view\", {}) and isinstance(o.get(\"view\"), dict) and o[\"view\"].get(\"text\"):\r\n                extra = (extra + \" \" if extra else \"\") + \"view: \" + o[\"view\"][\"text\"]\r\n            mark(inst, o[\"id\"], notes(o[\"id\"], o.get(\"confidence\"), v, extra))\r\n            placed[\"doors\" if kind == \"door\" else \"windows\"] += 1\r\n        except Exception as e:\r\n            say(\"opening %s not placed: %s\" % (o.get(\"id\"), e))\r\n\r\n    if do_rooms:\r\n        for fx in data.get(\"fixed\", []):\r\n            poly = fx.get(\"polygon\") or []\r\n            typ = (fx.get(\"type\") or \"other\").lower()\r\n            h = fx.get(\"height\")\r\n            if h is None:\r\n                h = FIXED_H.get(typ, 900)\r\n                h = ceiling if h is None else h\r\n            if len(poly) < 3 or not h:\r\n                if typ == \"void\":\r\n                    say(\"%s (void) not modelled: cut it in the floor yourself\" % fx.get(\"id\"))\r\n                continue\r\n            try:\r\n                ds = block(poly, level.Elevation, h)\r\n                v = phase_it(ds, fx[\"id\"])\r\n                mark(ds, fx[\"id\"], notes(fx[\"id\"], fx.get(\"confidence\"), v, typ))\r\n                try:\r\n                    ds.SetName(\"%s %s\" % (fx[\"id\"], typ))\r\n                except Exception:\r\n                    pass\r\n                placed[\"fixed elements\"] += 1\r\n            except Exception as e:\r\n                say(\"fixed element %s not placed: %s\" % (fx.get(\"id\"), e))\r\n\r\n    if do_rooms and rooms_json:\r\n        finishes = {}\r\n        for r in data.get(\"register\", []):\r\n            el = str(r.get(\"element\", \"\"))\r\n            for part, bip in ((\"-floor\", BuiltInParameter.ROOM_FINISH_FLOOR), (\"-walls\", BuiltInParameter.ROOM_FINISH_WALL),\r\n                              (\"-ceiling\", BuiltInParameter.ROOM_FINISH_CEILING)):\r\n                mat = (r.get(\"material\") or \"\").strip()\r\n                if el.endswith(part) and mat:\r\n                    lst = finishes.setdefault(el[: -len(part)], {}).setdefault(bip, [])\r\n                    if mat not in lst:\r\n                        lst.append(mat)\r\n        try:\r\n            vname = \"%s - %s - existing\" % (VIEW_PREFIX, level.Name)\r\n            view = plan_view(level, ph_ex, vname)\r\n            sp = SketchPlane.Create(doc, level.Id)\r\n            seen = set()\r\n            ca = CurveArray()\r\n            for r in rooms_json:\r\n                poly = r[\"polygon\"]\r\n                for i in range(len(poly)):\r\n                    p, q = poly[i], poly[(i + 1) % len(poly)]\r\n                    for s, e in uncovered(p, q, walls_json):\r\n                        key = tuple(sorted([(round(s[0]), round(s[1])), (round(e[0]), round(e[1]))]))\r\n                        if key in seen:\r\n                            continue\r\n                        seen.add(key)\r\n                        ca.Append(Line.CreateBound(xyz(s, level.Elevation), xyz(e, level.Elevation)))\r\n            if ca.Size > 0:\r\n                lines = doc.Create.NewRoomBoundaryLines(sp, ca, view)\r\n                for ln in list(lines):\r\n                    set_text(ln, BuiltInParameter.ALL_MODEL_INSTANCE_COMMENTS, TAG + \" separation\")\r\n                placed[\"separation lines\"] = ca.Size\r\n            doc.Regenerate()\r\n            phase = ph_ex or ph_last\r\n            topo = doc.get_PlanTopology(level, phase)\r\n            circuits = list(topo.Circuits)\r\n            used = set()\r\n            for r in rooms_json:\r\n                poly = r[\"polygon\"]\r\n                hit = None\r\n                for k, c in enumerate(circuits):\r\n                    if k in used or c.IsRoomLocated:\r\n                        continue\r\n                    uv = c.GetPointInside()\r\n                    if inside((uv.U * FT, uv.V * FT), poly):\r\n                        hit = k\r\n                        break\r\n                if hit is None:\r\n                    ip = interior_point(poly)\r\n                    say(\"room %s (%s): no enclosed region found at %.0f,%.0f - check walls and separation lines\"\r\n                        % (r[\"id\"], r.get(\"name\"), ip[0], ip[1]))\r\n                    continue\r\n                used.add(hit)\r\n                room = doc.Create.NewRoom(phase)\r\n                room = doc.Create.NewRoom(room, circuits[hit])\r\n                room.Name = r.get(\"name\") or r[\"id\"]\r\n                room.Number = r[\"id\"]\r\n                ch = r.get(\"ceiling_height\") or lv_json.get(\"ceiling_height\")\r\n                if ch:\r\n                    prm = room.get_Parameter(BuiltInParameter.ROOM_UPPER_OFFSET)\r\n                    if prm is not None and not prm.IsReadOnly:\r\n                        prm.Set(ft(ch))\r\n                for bip, mats in finishes.get(r[\"id\"], {}).items():\r\n                    set_text(room, bip, \" / \".join(mats))\r\n                set_text(room, BuiltInParameter.ALL_MODEL_INSTANCE_COMMENTS,\r\n                         TAG + \" \" + r[\"id\"] + \" \" + (r.get(\"confidence\") or \"\"))\r\n                placed[\"rooms\"] += 1\r\n        except Exception as e:\r\n            say(\"rooms not placed: %s\" % e)\r\n\r\n    order = [\"walls\", \"doors\", \"windows\", \"openings\", \"fixed elements\", \"rooms\", \"separation lines\"]\r\n    say(\"placed \" + \", \".join(\"%d %s\" % (placed[k], k) for k in order))   # fixed order: IronPython 2.7 dicts are unordered\r\n    if ph_ex is not None:\r\n        say(\"phase: everything placed as '%s'%s\" % (ph_ex.Name, (\"; strip = demolished in '%s'\" % ph_next.Name)\r\n                                                     if (do_phases and ph_next is not None) else \"\"))\r\n    undecided = [e[\"id\"] for k in (\"walls\", \"openings\", \"fixed\") for e in data.get(k, []) if not ksa.get(e[\"id\"])]\r\n    if undecided:\r\n        say(\"%d elements have no keep / strip / alter yet: they stay Existing\" % len(undecided))\r\n    if do_rooms:\r\n        say(\"rooms and separation lines are in the view '%s - %s - existing'\" % (VIEW_PREFIX, level.Name))\r\n    if assumed:\r\n        say(\"no sill height in the reading for \" + \", \".join(assumed) +\r\n            \": sill 900, head 2100 used as placeholders. Measure them, add sill and height to the file, run again\")\r\n    if swings:\r\n        say(\"door hinge side is not set by the script: check \" + \"; \".join(swings) +\r\n            \". Select the door and use the flip arrows.\")\r\n    north = proj.get(\"north_deg\")\r\n    if north is not None:\r\n        say(\"true north is %.0f degrees clockwise from up the page. To show it: Manage > Location > \"\r\n            \"Rotate True North, or note it on the sheet\" % float(north))\r\n    return placed\r\n\r\n\r\n# ---------- host ----------\r\nif HOST == \"dynamo\":\r\n    _level = IN[1].strip() if isinstance(IN[1], str) else \"\"  # noqa: F821\r\n    _rooms = bool(IN[2]) if len(IN) > 2 else True  # noqa: F821\r\n    _phases = bool(IN[3]) if len(IN) > 3 else True  # noqa: F821\r\n    TransactionManager.Instance.EnsureInTransaction(doc)\r\n    try:\r\n        run(IN[0], _level, _rooms, _phases)  # noqa: F821\r\n    except Exception as _e:\r\n        say(\"STOPPED: %s\" % _e)\r\n    TransactionManager.Instance.TransactionTaskDone()\r\n    OUT = report\r\nelse:\r\n    from pyrevit import forms, revit, script\r\n    _out = script.get_output()\r\n    _path = forms.pick_file(file_ext=\"json\", title=\"Pick room_checked.json from the Room Reading output\")\r\n    if _path:\r\n        with revit.Transaction(\"Room Reading to Revit\", swallow_errors=True):\r\n            try:\r\n                run(_path, \"\", True, True)\r\n            except Exception as _e:\r\n                say(\"STOPPED: %s\" % _e)\r\n        _out.print_md(\"## Room Reading to Revit\")\r\n        for _line in report:\r\n            _out.print_md(\"- \" + _line)\r\n",
      "Engine": "PythonNet3",
      "VariableInputPorts": true,
      "Id": "e0d2a0517c5a418793ac2b1630e00f8f",
      "Inputs": [
        {
          "Id": "eac12c89a8ee4b12ac3804a3c465abaa",
          "Name": "IN[0]",
          "Description": "Input #0",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        },
        {
          "Id": "bc3f896ccf654f43a7d4d4580d364322",
          "Name": "IN[1]",
          "Description": "Input #1",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        },
        {
          "Id": "cad6dca5ff434f28b4bb3342167703ae",
          "Name": "IN[2]",
          "Description": "Input #2",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        },
        {
          "Id": "0e6cdde73b3247568af9eef99075e12f",
          "Name": "IN[3]",
          "Description": "Input #3",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        },
        {
          "Id": "924063ede1c149fea3b21e734a74fa20",
          "Name": "IN[4]",
          "Description": "Input #4",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Outputs": [
        {
          "Id": "10209eac398145da9a33710620927155",
          "Name": "OUT",
          "Description": "Result of the python script",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Replication": "Disabled",
      "Description": "Runs an embedded Python script."
    },
    {
      "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels",
      "NodeType": "ExtensionNode",
      "Id": "7efcc4682e264be49203c79252950c57",
      "Inputs": [
        {
          "Id": "83c70c32246d403da8ea9a61b3984993",
          "Name": "",
          "Description": "Node to evaluate.",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Outputs": [
        {
          "Id": "22a52c67719646ab80a88adaed562855",
          "Name": "",
          "Description": "Watch contents.",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Replication": "Disabled",
      "Description": "Visualize the output of node."
    }
  ],
  "Connectors": [
    {
      "Start": "e0fb05f008404b909ab81c9b96196287",
      "End": "eac12c89a8ee4b12ac3804a3c465abaa",
      "Id": "6efecaed4dcc4528935409ba2e85f219",
      "IsHidden": "False"
    },
    {
      "Start": "4cc369015b9a4d7b9197524966ba5878",
      "End": "bc3f896ccf654f43a7d4d4580d364322",
      "Id": "1b4ecfda14cc48c8aa95c6ce61804c3c",
      "IsHidden": "False"
    },
    {
      "Start": "7cfab34a6aad4b51aafe1da57573f615",
      "End": "cad6dca5ff434f28b4bb3342167703ae",
      "Id": "bdde15d6e9a8408c83c866ee28219a94",
      "IsHidden": "False"
    },
    {
      "Start": "d0e868bfe6614e4d990bbe0a7f0d10bf",
      "End": "0e6cdde73b3247568af9eef99075e12f",
      "Id": "35b73eacb4424a9f82ded7952933ba3a",
      "IsHidden": "False"
    },
    {
      "Start": "e4c72caf641442379c90cae430f78ae4",
      "End": "924063ede1c149fea3b21e734a74fa20",
      "Id": "dd9de604419848e393000b8e3b9bf902",
      "IsHidden": "False"
    },
    {
      "Start": "10209eac398145da9a33710620927155",
      "End": "83c70c32246d403da8ea9a61b3984993",
      "Id": "646ddbeb7d3f48d082225d21b11e9de9",
      "IsHidden": "False"
    }
  ],
  "Dependencies": [],
  "NodeLibraryDependencies": [],
  "Bindings": [],
  "View": {
    "Dynamo": {
      "ScaleFactor": 1.0,
      "HasRunWithoutCrash": false,
      "IsVisibleInDynamoLibrary": true,
      "Version": "4.0.0.0",
      "RunType": "Manual",
      "RunPeriod": "1000"
    },
    "Camera": {
      "Name": "Background Preview",
      "EyeX": -17.0,
      "EyeY": 24.0,
      "EyeZ": 50.0,
      "LookX": 12.0,
      "LookY": -13.0,
      "LookZ": -58.0,
      "UpX": 0.0,
      "UpY": 1.0,
      "UpZ": 0.0
    },
    "NodeViews": [
      {
        "ShowGeometry": true,
        "Name": "1  room_checked.json  (Browse...)",
        "Id": "e71541d28ea0451cbeaa3679fa2c3c2b",
        "IsSetAsInput": true,
        "IsSetAsOutput": false,
        "Excluded": false,
        "X": 0,
        "Y": 0
      },
      {
        "ShowGeometry": true,
        "Name": "2  Level name (blank = name in the file)",
        "Id": "8cf8b60ed1184d63ad6b306163dabf7f",
        "IsSetAsInput": true,
        "IsSetAsOutput": false,
        "Excluded": false,
        "X": 0,
        "Y": 150
      },
      {
        "ShowGeometry": true,
        "Name": "3  Place rooms and fixed elements",
        "Id": "8bbc298c5f704973a740e377cdedfa28",
        "IsSetAsInput": true,
        "IsSetAsOutput": false,
        "Excluded": false,
        "X": 0,
        "Y": 290
      },
      {
        "ShowGeometry": true,
        "Name": "4  Keep / strip / alter as phases",
        "Id": "919d31bfc0d34a0eb75d4131517f192b",
        "IsSetAsInput": true,
        "IsSetAsOutput": false,
        "Excluded": false,
        "X": 0,
        "Y": 420
      },
      {
        "ShowGeometry": true,
        "Name": "5  Run again: flip this, then Run",
        "Id": "b949d07bdf7944f180fe9c5080fc86ba",
        "IsSetAsInput": true,
        "IsSetAsOutput": false,
        "Excluded": false,
        "X": 0,
        "Y": 550
      },
      {
        "ShowGeometry": true,
        "Name": "Room Reading -> Revit",
        "Id": "e0d2a0517c5a418793ac2b1630e00f8f",
        "IsSetAsInput": false,
        "IsSetAsOutput": false,
        "Excluded": false,
        "X": 480,
        "Y": 250
      },
      {
        "ShowGeometry": true,
        "Name": "Report",
        "Id": "7efcc4682e264be49203c79252950c57",
        "IsSetAsInput": false,
        "IsSetAsOutput": false,
        "Excluded": false,
        "X": 820,
        "Y": 250
      }
    ],
    "Annotations": [
      {
        "Id": "5d323e968d4a48b48ce808f6448809a1",
        "Title": "Set these, then press Run (bottom left). Output goes to the Report node.",
        "Nodes": [
          "e71541d28ea0451cbeaa3679fa2c3c2b",
          "8cf8b60ed1184d63ad6b306163dabf7f",
          "8bbc298c5f704973a740e377cdedfa28",
          "919d31bfc0d34a0eb75d4131517f192b",
          "b949d07bdf7944f180fe9c5080fc86ba"
        ],
        "Left": -20,
        "Top": -60,
        "Width": 380,
        "Height": 700,
        "FontSize": 18.0,
        "InitialTop": 0,
        "InitialHeight": 640,
        "TextblockHeight": 50,
        "Background": "#FFC1D676"
      }
    ],
    "X": 60.0,
    "Y": 120.0,
    "Zoom": 0.9
  }
}