Hi,
I am new to Aris reports and macros. Glad to be here communicating with all you expert.
I now trying to re-writing a legacy VB script which export process definitions to excel. My goal is to create a report in ARIS Business Architect 7.1 with javascript which can generate the same report as VB script.
In the VB script, it get an 'object ID' of numeric type through a COM object. The code is
<code>
Set oProcessDefList = CreateObject("ARIS.OBJDEFLIST." & cARISVersion)
...
oObjDef = oProcessDefList.Get(nI)
...
oWorksheet.Cells(nRow, A).value = oObjDef.ObjectID()
</code>
The ObjectID() method in the last line returns a number and put it into a cell.
In javascript, I tried Item.GUID(), Item.ObjectID() and Item.OID() method to get object ID. None of them returns the same value as what VB script returns. I also tried some attributes like AT_EGOV_ELAK_ID, AT_ID, AT_OBJ_ACS_ID,AT_RBE_OBJ_ID, and AT_EXTERNAL_ID, still not correct. It seems in new version of Aris, the object ID of numeric type is no longer supported.
My question is if there is a way to get the numeric object ID with javascript. Or if it is possible to create COM object in javascript like it is in VB script?
Any tips is appreciated. Thanks in advance.
Regards,
Will
Torsten Haase on
Hi Will,
the method to use is "Item.ObjectID()" which returns the objectID as a string.
If you really need to create an array in JavaScript just use var myArray = new Array() or the short form, for example if you have 2 ObjOccs (occ1 and occ2), which should be placed in an array:
var myArray = [occ1, occ2]
You should not need to use the Microsoft-specific COM in JavaScript. You can create excel output using the built-in Excel support (Context.createExcelWorkbook(...)).
I hope this helps. Feel free to ask if youo have any furter questions.
BR, Torsten