X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.tutorial%2Fscl%2FTutorial%2F2.02%20Model%20configuration.md;fp=bundles%2Forg.simantics.scl.tutorial%2Fscl%2FTutorial%2F2.02%20Model%20configuration.md;h=c881ca5fbad5da792e64728d9234b56f2137e26f;hb=39fd9bd29b18a2f7abe62fb13da3359b3618dda7;hp=0000000000000000000000000000000000000000;hpb=f024c0a7208e379a82f0ab51a71a123f9bb2a2bb;p=simantics%2Fplatform.git 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 index 000000000..c881ca5fb --- /dev/null +++ b/bundles/org.simantics.scl.tutorial/scl/Tutorial/2.02 Model configuration.md @@ -0,0 +1,43 @@ + +# Model configuration + +Apros 6.05 contains a new module `Apros/Legacy` for manipulating the model configuration +with commands that are familiar to Apros 5 developers. Idea of the module is that +all Apros entities are referred by their names in the Apros solver. + +## Updating model configuration + +::value[Apros/Legacy/aadd, Apros/Legacy/aaddNonvisual, Apros/Legacy/amodi, Apros/Legacy/aconnect, Apros/Legacy/aconnectWithName] +::value[Apros/Legacy/ainclude, Apros/Legacy/aexclude, Apros/Legacy/arename] + +## Examples + +The following commands build a point-pipe-point configuration to subprocess MYDIAGRAM. + + import "Apros/Legacy" + aadd "MYDIAGRAM" "Point" "PO01" (50, 50) + amodi "PO01" "PO11_PRESSURE" 0.2 + aexclude "PO01" + + aadd "MYDIAGRAM" "Point" "PO02" (100, 50) + amodi "PO02" "PO11_PRESSURE" 0.1 + aexclude "PO02" + + aadd "MYDIAGRAM" "Pipe" "PIP01" (75, 50) + amodi "PIP01" "PI12_CONNECT_POINT_1" "PO01" + amodi "PIP01" "PI12_CONNECT_POINT_2" "PO02" + +Alternatively `aconnect` can be used to create the same name reference connections: + + aconnect "PO01" "SelfPOINT" "PIP01" "PI12_CONNECT_POINT_1" + aconnect "PO02" "SelfPOINT" "PIP01" "PI12_CONNECT_POINT_2" + +Notice the attribute name "SelfPOINT" which represents the MODNAME terminal of the POINT module. +To make a reference to a module's MODNAME terminal, use "SelfMT" as the attribute name, where +MT is the module type name in uppercase. + +## Making model queries + +The module contains also the basic commands for making model queries: + +::value[Apros/Legacy/ashow, Apros/Legacy/alist, Apros/Legacy/alistOnly, Apros/Legacy/aget, Apros/Legacy/amget, Apros/Legacy/amgetSort]