]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.tutorial/scl/Tutorial/2.02 Model configuration.md
Import org.simantics.scl.tutorial from incubator SVN repo
[simantics/platform.git] / bundles / org.simantics.scl.tutorial / scl / Tutorial / 2.02 Model configuration.md
diff --git a/bundles/org.simantics.scl.tutorial/scl/Tutorial/2.02 Model configuration.md b/bundles/org.simantics.scl.tutorial/scl/Tutorial/2.02 Model configuration.md
new file mode 100644 (file)
index 0000000..c881ca5
--- /dev/null
@@ -0,0 +1,43 @@
+\r
+# Model configuration\r
+\r
+Apros 6.05 contains a new module `Apros/Legacy` for manipulating the model configuration\r
+with commands that are familiar to Apros 5 developers. Idea of the module is that\r
+all Apros entities are referred by their names in the Apros solver.\r
+\r
+## Updating model configuration\r
+\r
+::value[Apros/Legacy/aadd, Apros/Legacy/aaddNonvisual, Apros/Legacy/amodi, Apros/Legacy/aconnect, Apros/Legacy/aconnectWithName]\r
+::value[Apros/Legacy/ainclude, Apros/Legacy/aexclude, Apros/Legacy/arename]\r
+\r
+## Examples\r
+\r
+The following commands build a point-pipe-point configuration to subprocess MYDIAGRAM.\r
+\r
+    import "Apros/Legacy" \r
+    aadd "MYDIAGRAM" "Point" "PO01" (50, 50)\r
+    amodi "PO01" "PO11_PRESSURE" 0.2\r
+    aexclude "PO01"\r
+   \r
+    aadd "MYDIAGRAM" "Point" "PO02" (100, 50)\r
+    amodi "PO02" "PO11_PRESSURE" 0.1\r
+    aexclude "PO02"\r
+   \r
+    aadd "MYDIAGRAM" "Pipe" "PIP01" (75, 50)\r
+    amodi "PIP01" "PI12_CONNECT_POINT_1" "PO01"\r
+    amodi "PIP01" "PI12_CONNECT_POINT_2" "PO02"\r
+\r
+Alternatively `aconnect` can be used to create the same name reference connections:\r
+\r
+    aconnect "PO01" "SelfPOINT" "PIP01" "PI12_CONNECT_POINT_1" \r
+    aconnect "PO02" "SelfPOINT" "PIP01" "PI12_CONNECT_POINT_2" \r
+\r
+Notice the attribute name "SelfPOINT" which represents the MODNAME terminal of the POINT module.\r
+To make a reference to a module's MODNAME terminal, use "SelfMT" as the attribute name, where\r
+MT is the module type name in uppercase.\r
+\r
+## Making model queries\r
+\r
+The module contains also the basic commands for making model queries:\r
+\r
+::value[Apros/Legacy/ashow, Apros/Legacy/alist, Apros/Legacy/alistOnly, Apros/Legacy/aget, Apros/Legacy/amget, Apros/Legacy/amgetSort]\r