University of Vienna - OMILABProject specific questions and answers from the work at the University of Vienna.Automatic Text ResizeFlorian Schierlinger-Brandmayrhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=20531452021-02-10T15:58:38Z2021-02-10T15:58:38ZHello everybody,<br /><br />is there a way to autmatically resize Text font sizes, when e.g. an element containing a rectangle with some text inside is manually resized in the model by the user? Is this provided with the core functionality of sizing and can be done in the graphrep?<br />In my first try, the rectangle can be resized, but the text font size stays the same. Or do I have to write an AdoScript for that purpose?<br /><br />Thanks a lot for the help.<br /><br />Cheers,<br />FlorianFlorian Schierlinger-Brandmayr2021-02-10T15:58:38ZRE: Working with map in AdoScriptPatrikhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=18723992020-05-28T09:05:47Z2020-05-28T09:02:30ZHello,<br /><br />I decided to create an updated version of the "get keys from a map" functions, which you can find in the file attached to this post. It provides four global functions, which have fewer restrictions and are more precise than the previous version:<br /><br /><strong>mapKeysArray(myMap)</strong> - returns an array containing all the keys. It uses their correct type (i.e. integer keys are integers in the array and string keys are strings in the array).<br /><strong>mapKeysTypes(myMap)</strong> - returns a whitespace (" ") separated list (string) containing all the types of the keys (whether all keys are of type string, whether they are a mix of string and integer, whether they are only integer keys etc.).<br /><strong>mapKeysList(myMap)</strong> - returns a "~" separated list (string) containing all the keys. This one works ONLY for maps where all the keys are strings. Because of that the entries in the list are also strings and not further encoded.<br /><strong>mapKeysTypedList(myMap)</strong> - returns a "~" separated list (string) containing all the keys. The entries in the list reflect their type (e.g. strings are surounded by double-quotes "). The actual values with the correct type can be obtained by using the eval(...) function.<br /><br />Additional details can be found in the file as comments as well as some simple testing code.<br /><br />Best regards,<br />PatrikPatrik2020-05-28T09:02:30ZADOxx Color Names with detailed valuesPatrikhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=14201952019-01-09T13:46:33Z2018-11-19T13:59:34ZHi<br /><br />I have created an excel spreadsheet with details about the named colors in ADOxx (RGB, HSV, and some more) in hopes that it will help me with selecting better/the right colors in the future.<br />You can find the file attached. Maybe it can help you too.<br /><br />Best regards,<br />PatrikPatrik2018-11-19T13:59:34ZRE: Can you get the dimentions of an image stored in a file through AdoScriMateusz Dziedzichttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=13733212018-09-20T07:59:23Z2018-09-20T07:58:18ZDear Patrik,<br /><br />One way is to use the <a href="https://www.adoxx.org/AdoScriptDoc/files/Message_Ports/UI_APIs/AdoScript/FREAD-js.html#FREAD">FREAD</a> function to read the content of the file. The content then can be stored in a variable and you can use the <a href="https://www.adoxx.org/live/attribute-type-expression#String_Functions">String functions</a> (e.g. search, bsearch, copy etc.) to search and get the values you need.Mateusz Dziedzic2018-09-20T07:58:18ZCan you get the dimentions of an image stored in a file through AdoScript?Patrikhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=13732932018-09-20T07:01:29Z2018-09-20T07:00:33ZHi<br /><br />Is there some (hopefully simple) way using AdoScript of getting the width and height of an image that is stored in a file?<br /><br />Best regards,<br />PatrikPatrik2018-09-20T07:00:33ZRE: Hide all those details of an attribute referencing an Attribute ProfilePatrikhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=11885632018-04-03T13:42:46Z2018-04-03T13:36:44Z<div class="quote-title">Wilfrid Utz:</div><div class="quote"><div class="quote-content">Dear Patrik,<br /><br />the attribute profile is intended to use pre-defined set of attributes at different instances (re-use of attribute information as profiles). <br />The representation can not be further changed as it is part of the profile itself. The referencing attribute follows the same syntax as for AttrReps (see here https://www.adoxx.org/live/adoxx-attribute-notation-language-attrrep) and can be disables.<br /></div></div><br /><br />I'm sorry, I have troubles understanding the second part. So I can specify in the referencing attribute ("Reference to MyAP") how the Details of the referenced Attribute Profile (an instance of "MyAP") should be presented in the Notebook of the Object?Patrik2018-04-03T13:36:44ZRE: Hide all those details of an attribute referencing an Attribute ProfileWilfrid Utzhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=11885582018-04-03T13:19:58Z2018-04-03T13:19:58ZDear Patrik,<br /><br />the attribute profile is intended to use pre-defined set of attributes at different instances (re-use of attribute information as profiles). <br />The representation can not be further changed as it is part of the profile itself. The referencing attribute follows the same syntax as for AttrReps (see here https://www.adoxx.org/live/adoxx-attribute-notation-language-attrrep) and can be disables.Wilfrid Utz2018-04-03T13:19:58ZRE: Can you change Icons of Attribute Profiles?Wilfrid Utzhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=11885532018-04-03T13:15:31Z2018-04-03T13:15:31ZHi Patrik,<br /><br />it is not possible to change the icon of an attribute profile at this stage. A generic icon is used for this purpose.Wilfrid Utz2018-04-03T13:15:31ZHide all those details of an attribute referencing an Attribute ProfilePatrikhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=11825712018-03-28T13:30:32Z2018-03-28T13:30:18ZHi<br /><br />I have an Attribute Profile Class with several attributes and a defined Notebook. I also have a Class with an attribute that can reference instances of that Attribute Profile. When I add the attribute to the Notebook it shows all the attributes of the Attribute Profile (see attached image), which is a bit to much for me. Are there any options to control/reduce the amount of shown attributes from the referenced Attribute Profile in the object that references it?Patrik2018-03-28T13:30:18ZRE: Trouble Accessing Attribute Values of an Attribute ProfilePatrikhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=11712242018-03-19T11:43:17Z2018-03-19T11:41:48ZThank you, it works now using the <em>CC "Core" debug GET_ALL_ATTRPROF_VERSIONS_OF_THREAD ...</em> you described.<br />Using AQL to access the Attribute Profiles also sounds interesting. How can I do that in AdoScript? How would the <em>CC "AQL" EVAL_AQL_EXPRESSION ...</em> look to access an Attribute Profile instance that is not assigned to any model/object attribute?Patrik2018-03-19T11:41:48ZRE: Trouble Accessing Attribute Values of an Attribute ProfileMateusz Dziedzichttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=11711522018-03-19T10:12:07Z2018-03-19T10:04:28ZSimilar as for model versioning you just have to get the version id from the thread → those are then the actual instances. Thus, you need one additional line:<br /><br /><div class="code"><span class="code-lines"> 1</span><br /><span class="code-lines"> 2</span>CC "Core" debug GET_ALL_ATTRPROF_SUBDIRS <br /><span class="code-lines"> 3</span>CC "Core" debug GET_ALL_ATTRPROF_THREADS_IN_DIR apdirid:(VAL token(apdirids,0," ")) <br /><span class="code-lines"> 4</span>SET nApThreadIDs:(apthreadids) <br /><span class="code-lines"> 5</span><br /><span class="code-lines"> 6</span>CC "Core" debug GET_ALL_ATTRPROF_VERSIONS_OF_THREAD apthreadid:(VAL token(nApThreadIDs,0," ")) <br /><span class="code-lines"> 7</span>SETL nApVersionIDs:(VAL apversionids) <br /><span class="code-lines"> 8</span><br /><span class="code-lines"> 9</span>#This is a bit short-handed, assumes only one thread returned. <br /><span class="code-lines">10</span>CC "Core" debug GET_ATTRPROF_CLASS_OF_THREAD apthreadid:(VAL nApThreadIDs) <br /><span class="code-lines">11</span>CC "Core" debug GET_ALL_ATTRS classid:(apclassid) <br /><span class="code-lines">12</span>CC "Core" debug GET_CLASS_NAME classid:(apclassid) <br /><span class="code-lines">13</span><br /><span class="code-lines">14</span>CC "Core" debug GET_ATTR_VAL objid:(nApVersionIDs) attrid:(VAL attrids) <br /></div><br />Alternatively, you can use the AQL queries, instead of working with directories, to handle the instances directly.Mateusz Dziedzic2018-03-19T10:04:28ZCan you change Icons of Attribute Profiles?Patrikhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=11655892019-01-09T13:33:47Z2018-03-15T10:33:46ZHi<br /><br />Still working with Attribute Profiles and I was wondering: is it possible to change the icon that is shown in the Modelling Toolkit based on the Attribute Profile Class? I would like to do this so it's easier to distinguish the different types of Attribute Profiles from one another. For example the attached image shows four different Attribute Profile instances, but they currently all use the same icon. Can I change it and if yes then how?Patrik2018-03-15T10:33:46ZTrouble Accessing Attribute Values of an Attribute ProfilePatrikhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=11651882019-01-09T13:35:11Z2018-03-15T08:31:06ZHi<br /><br />I have started working with Attribute Profiles. I created a simple attribute profile class hierarchy using two classes where both have one attribute (besies the typical AttrRep, ClassAbstract etc.). I then created an instance in the modelling toolkit, set the value of the one attribute and tried to retrieve it using the following AdoScript:<br /><div class="code"><span class="code-lines">1</span>CC "Core" GET_ALL_ATTRPROF_SUBDIRS<br /><span class="code-lines">2</span># Since right now there is only one instance this shouldn't be a problem<br /><span class="code-lines">3</span>CC "Core" GET_ALL_ATTRPROF_THREADS_IN_DIR apdirid:(VAL token(apdirids,0," "))<br /><span class="code-lines">4</span>SETL thingid:(VAL apthreadids)<br /><span class="code-lines">5</span>CC "Core" debug GET_ATTRPROF_CLASS_OF_THREAD apthreadid:(thingid)<br /><span class="code-lines">6</span># Again since there is only one possible attribute this also shouldn't be a problem<br /><span class="code-lines">7</span>CC "Core" debug GET_ALL_ATTRS classid:(apclassid)<br /><span class="code-lines">8</span>CC "Core" debug GET_ATTR_VAL objid:(thingid) attrid:(VAL attrids)<br /></div><br />Everything works with the exception of the last GET_ATTR_VAL call. This one returns an ecode:71 with errtext:"ATTRIBUTEOWNER_NOT_EXISTING". Could it have to do something with the class hierarchy? Or are the attribue values of Attribute Profiles accessed differently?Patrik2018-03-15T08:31:06ZRE: Integration of librariesWilfrid Utzhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=11222212018-02-06T15:58:34Z2018-02-06T15:58:34ZThis is currently only possible through interaction with us. Please send us your libraries and we can convert them to ALL format that can be used for integration!Wilfrid Utz2018-02-06T15:58:34ZRE: Pictures of referenced modelWilfrid Utzhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=11222182018-02-06T15:57:03Z2018-02-06T15:57:03ZTo have submodel functionality realized, you do not need to derive it from the abstract "__Subgraph__" class. <br />You want to use the "Model pointer" class attribute (a platform attribute, that is available for every class, similiar as GRAPHREP). A step-by-step guide how to define the modelpointer is below:<br /><br />a) Create a new INTERREF attribute in the class you want to provide sub-model functionality. The INTERREF needs to be defined to as a single model reference.<br />e.g.<br /><div class="code"><span class="code-lines">1</span>REFDOMAIN<br /><span class="code-lines">2</span> MODREF <br /><span class="code-lines">3</span> mt:"Storyboard" <br /><span class="code-lines">4</span> max:1<br /></div><br /><br />b) Define the "Model pointer" by entering the name of the INTERREF attribute defined in a) as the standard value.<br />c) READY!<br /><br />The functionality that is available through the model pointer is:<br />a) Submodel viewing (expand/shrink): new entries are available in the context menu of such objects (see screenshot)<br />b) CTRL-Double Click to jump to the model<br /><br /><br />Interaction with AdoScript is possible. The following commands are available in the Modeling messageport<br /><br /># check whether an object is expanded<br />CC "Modeling"IS_EXPANDED objid:id .<br />#-->RESULT ecode:intValue expanded:boolValue .<br /><br /># expand the submodel reference by the object<br />CC "Modeling"EXPAND objid:id .<br />#-->RESULT ecode:intValue .<br /><br /># shrink the submodel referenced by the object<br />CC "Modeling"SHRINK objid:id .<br />#-->RESULT ecode:intValue .<br /><br />In case you want to change things in the submodel, you need to interact with the submodel itself.Wilfrid Utz2018-02-06T15:57:03ZRE: Stability of the Modelling ToolkitWilfrid Utzhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=11219222018-02-06T15:36:54Z2018-02-06T15:36:54ZHi Crhistian,<br /><br />we have investigated your case and the problem on stability occur in the following circumstances:<br /><br />a) ADOxx is running locally in service mode (e.g. service port is started in the Modelling Toolkit)<br />b) The AdoScript is sent to the service port and it performs UI based interactions (e.g. usage of "modeling" messageport).<br /><br />In case the user of the Modelling Toolkit with open webservice port starts to interact with the tool at the same time, stability issues can occur. In order to prevent such situation please consider the following:<br /><br />1) Make sure to operate on "core" messageport operations only when using the webservice. <br />2) Perform the operation of the webservice in a way that user interaction is blocked (e.g. using MSGWIN) in case the model is open.<br />3) Check interaction logic<br /><br />All these steps are requirements for using the LBRSWS which is wrapping across multiple ADOWS instances, running in server mode. This means that the ADOWS instance is available without any UI for interaction. The LBRWS provides a similar WS operation in order to interact with the service plus adds monitoring and restart capabilities.<br />To use the environment, you can only use LBRSWS and RAM. The ADOxxWEBAPI is an abstraction of AdoScript operation in Java, meaning that you do not need to write AdoScript code to interact with the platform but you can use Java instead. In addition you also have a UI for testing these operations interactively.<br /><br />Regarding installation and packaging, the LBRSWS/RAM/ADOWS and also ADOxxWEBAPI building block is intended to be used on a server. Therefore we do not package it into the process but would propose to add it to the installation ZIP and provide guidance how to deploy on a local infrastructure.<br /><br />Please find below details on the mentioned tools/implementations for your convinience:<br />a) ADOWS: https://www.adoxx.org/svn/devtools/2%20ADOxx%20Building%20Blocks/2%20ADOxxWEB%20API/ADOWS%2015/<br />b) RAM: https://www.adoxx.org/svn/devtools/2%20ADOxx%20Building%20Blocks/2%20ADOxxWEB%20API/RemoteADOWSMonitor/<br />c) LBRSWS: https://www.adoxx.org/svn/devtools/2%20ADOxx%20Building%20Blocks/2%20ADOxxWEB%20API/LBRSWS/<br />d) Java Client for LBRSWS: https://www.adoxx.org/svn/devtools/2%20ADOxx%20Building%20Blocks/9%20ADOxx%20Legacy%20clients/LBRSWSJAVAIntegration/<br />e) ADOxxWebAPI (make sure to get all dependencies for this one): https://www.adoxx.org/svn/devtools/2%20ADOxx%20Building%20Blocks/2%20ADOxxWEB%20API/ADOxxWeb%20API/<br /><br />Hope this helps. Let me know if you need any further details!Wilfrid Utz2018-02-06T15:36:54ZRE: Title of a DOCKABLE_BROWSERWilfrid Utzhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=11215242018-02-06T12:32:44Z2018-02-06T12:32:44ZThanks for the documentation and feedback.Wilfrid Utz2018-02-06T12:32:44ZRE: Text in TLB_CREATEWilfrid Utzhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=11209102018-02-05T12:47:04Z2018-02-05T12:47:04ZDear *,<br /><br />your observation is correct: the size of the boxtext is limited by the size of the selection window. This means you have 2 options:<br /><br />a) Change the size of the window using the "min-w" parameter and align the text length with the size selected.<br />b) Provide the helptext in a button that shows the support message e.g. in an INFOBOX.<br /><br />Please find below an example in AdoScript code that shows both adaptations. Have a look at the loopcondition (WHILE) that enables the Help button to be switched with the actual TLB.<br /><br />Wilfrid<br /><br /><br /><div class="code"><span class="code-lines"> 1</span># create the main TreeListBox with all its parameters<br /><span class="code-lines"> 2</span>CC "AdoScript" TLB_CREATE title:"My title" oktext:"Close" canceltext:"No way!"<br /><span class="code-lines"> 3</span> boxtext:"This is a very long text to describe in detail the actions to be done and how to solve issues."<br /><span class="code-lines"> 4</span> no-help:1 button-w:90<br /><span class="code-lines"> 5</span> max-w:500 max-h:367 [b]min-w:500[/b] min-h:150 checklistbox:1<br /><span class="code-lines"> 6</span># insert some entries (as you like - ID should be unique)<br /><span class="code-lines"> 7</span>CC "AdoScript" TLB_INSERT id:1 text:"Do this"<br /><span class="code-lines"> 8</span>CC "AdoScript" TLB_INSERT id:2 text:"Do that"<br /><span class="code-lines"> 9</span># select the first entry (here: check it)<br /><span class="code-lines">10</span>CC "AdoScript" TLB_SELECT id:1 select:1<br /><span class="code-lines">11</span># add a button: important is the name of the button as this is set to the endbutton variable to check agains<br /><span class="code-lines">12</span>CC "AdoScript" TLB_ADD_BUTTON name:"bt1" text:"Click me for help" index:1<br /><span class="code-lines">13</span># and finally show it<br /><span class="code-lines">14</span>CC "AdoScript" TLB_SHOW<br /><span class="code-lines">15</span># just to debug the endbutton<br /><span class="code-lines">16</span>CC "AdoScript" INFOBOX (endbutton)<br /><span class="code-lines">17</span># this loop condition is important as it re-opens the TLB after showing the help text.<br /><span class="code-lines">18</span>WHILE (endbutton = "bt1") {<br /><span class="code-lines">19</span> CC "AdoScript" INFOBOX "This is my very long helptext, that has \n\n line breaks and a lot of other stuff written here." <br /><span class="code-lines">20</span> # show again the TLB after the helptext<br /><span class="code-lines">21</span> CC "AdoScript" TLB_SHOW<br /><span class="code-lines">22</span>}<br /><span class="code-lines">23</span>IF (ecode = 0) { <br /><span class="code-lines">24</span> CC "AdoScript" INFOBOX ("Selected ids: " + selectedids + "\n" + <br /><span class="code-lines">25</span> "You pushed the following button: " + endbutton)<br /><span class="code-lines">26</span>} ELSE { <br /><span class="code-lines">27</span> CC "AdoScript" INFOBOX ("You cancelled the dialog!")<br /><span class="code-lines">28</span>}<br /></div>Wilfrid Utz2018-02-05T12:47:04ZText in TLB_CREATEhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=11203242018-02-04T08:50:55Z2018-02-04T08:50:35ZDear ADOxx community!<br /><br />I would like to have more text in an TLB window. I included a screenshot of my problem in the thread. "In this window you...." should be a longer text but it is cut. How is it possible to include that text in full length. I tried to use the parameter boxtext.<br /><br />Another possibility would be to integrate a help button, but I did not get how to include text, which should be displayed when the help button is pressed.<br /><br />I am waiting for help - thanks in advance!2018-02-04T08:50:35ZRE: Unchangeable stringsMateusz Dziedzichttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=11054492018-01-18T14:28:02Z2018-01-18T14:25:03ZDear Christian, <br /><br />in order to show an unchangeable String in the Notebook you can:<br />1) Create a class attribute and define the String, which should be unchangeable, as the Standard value of this created class attribute<br /><br />2) Create an attribute and define the String, which should be unchangeable, as the Standard value of this created attribute + add “write-protected” in the AttrRep attribute of the class:f.e.: ATTR "NameOfCreatedAttribute" write-protectedMateusz Dziedzic2018-01-18T14:25:03Z