Browse Source

Updated some live modelling scripts that were broken

Yentl Van Tendeloo 5 years ago
parent
commit
a63717c27f
2 changed files with 2 additions and 2 deletions
  1. 1 1
      examples/live_modelling_DTCBD.py
  2. 1 1
      examples/live_modelling_FSA.py

+ 1 - 1
examples/live_modelling_DTCBD.py

@@ -35,7 +35,7 @@ def modify_model(model):
         if e.get("value", None) == 2.0:
             while 1:
                 time.sleep(1)
-        elif e.get("type", None) == "Design/AdditionBlock":
+        elif e.get("__type", None) == "Design/AdditionBlock":
             adder = e["__id"]
             links = read_outgoing(model, adder, "Design/Link")
             destinations = [read_association_destination(model, link) for link in links]

+ 1 - 1
examples/live_modelling_FSA.py

@@ -45,4 +45,4 @@ def edit_FSA(model):
             attr_assign(model, e["__id"], "initial", True)
             break
 
-process_execute("models/live_modelling_FSA", {"design_model": "models/FSA_model"}, {"models/FSA/edit": modify_model})
+process_execute("models/live_modelling_FSA", {"design_model": "models/FSA_model"}, {"models/FSA/edit": edit_FSA})