Hi,
I have just started learning Aris Scripting Language for preparing reports, I have been taking the tutorials available in this community,and though I understand most of it,I wanted to ask, how do output models and specific objects connected to the model? I read the article about how to output models and all the objects associated with it,but how to do it with specific objects?
For example,I want something in this format:
Model Name
Function:
Input:
Output:
KPI:
Application system:
I have done this in wysiwyg editor,but i want to hard code it. I also know there is already a report of this type present in Aris,I tried to study it,but its tough for me to understand.
Thanks in advance
Anaya
Hi Anaya,
If you have done it in the wysiwyg editor, right click on the script and choose "Edit code". You can then see what the actual code looks like. You should then be able to figure it out. Remember the actual text values is stored in "String Table" section.
If you don't get it right shout again.
Rgs,
Francois
Dear Mr. Francois,
Thank you for the reply.
I tried reading and understanding the script,I found in many places something like:
'constants.{some name}'
for example
constants.OUTEXCEL
is used. I searched Aris Help topics, but I couldnot get anything like this. I would like to know,when and where is 'constants. ' used? Also why is it used?
Thanks in advance,
Anaya
Hi Anaya,
The easiest way is to use the WYSIWYG editor and "Object definition (filterable by type)". In order to get the object definitions of a model you probably have inserted a table or used a query in the editor. In case of the table the editor is showing a section like "for all: Selected models". If you add a table here you can select "data for table rows" as the second step of the user dialog. The box "available data:" starts with "Items of: selected models". Further down there should be an entry "Object definitions" and below "Object definitions (filterable by type)". Select latter and proceed with "Next". On the next page you can select under "Parameters" the "Object type" (e.g. functions, application system etc.).
You can as well check the code afterwards and you will find something like:
dtable(p_output, p_aModel[i].ObjDefListByTypes([Constants.OT_FUNC]))
"OT_FUNC" is the API name of the object type Function and "Constants.OT_FUNC" represents the attribute type number "22". You can find those numbers and API nams in the configuration for other object types.
You could as well work with an unfiltered list of object definitions and just use IF or SELECT CASE statements to specify if an object type should be reported or not. E.g. IF statement used with a list of object definitions
for(var i1=0; i1<p_aObjDef.length; i1++) { if(p_aObjDef[i1].TypeNum()==22) { ...
Thanks for the help Martin..! :-)
One more question..
I have noticed that every report starts with the method " createOutputObject() ".
I read in the help topics for Aris Script that it is used to " Create a new output object" .
I am afraid I don't quite completely understand the meaning of creating output object. Why do we need it?
Thanks,
Anaya