Hello everyone,
I want to create a new library of objects (from scratch) on which I will then assign specific attributes. Anyone has any ideas how this is done?
All the training materials I have found so far cover how to use existing objects so I have nowhere to start from.
Many thanks for your help,
Konstantinos
1 Reply
-
Hi Konstantinos
One manual way is to copy Excel cells and paste into an ARIS model, and then manipulate the attributes with F8, also with copy/paste by row from Excel.
If you want to do it by program, here is one recipe. I generally take input from an Excel file usually resulting from an SAP extract to synchronize the data with ARIS.
Start from a group, create a model, create an object definition, and create object occurences...
Example:
var nLocale = Context.getSelectedLanguage()
var modeltype = 13 // EPC
var objtype = 22 // Function
var symbolnum = 335 // a function's symbol in the configvar group = devdb.RootGroup() // Main group in this example
var model = group.CreateModel(modeltype, "New model", nLocale)
var oObjDef = group.CreateObjDef (objtype, "New Function", nLocale)
var obj = model.createObjOcc(symbolnum, oObjDef, 50,50)To set object's attributes, locate the object and use the Attribute().setValue() like this:
obj.Attribute(Constants.AT_xxxxx, nLocale).setValue("value")
For custom attributes, use "UserDefinedAttributeTypeNum(GUID)".
Hope this helps !! Thierry