HR

Hi ARIS-Fans,

sorry, but I need a little assistence.

I have an object. This can ba a model, an objdef, a symbol/occurance, a connection or an attribut.

Now I need to know the object type. But because some of these objects are self defined, the way over .TypeNum() does not work at all. On every server the typenum is different. Thats why I want to use the GUID of the object type. I know the GUID because in Administration/Method I can see it.

But witch function gives me the GUID of the object type?

I'm sure, it is easy. But I can't find it in the ARIS helpsite. We use ARIS 9.8 on two servers.

Many thanks in advance

Holger

by Kay Fischbach
Posted on Wed, 08/26/2020 - 10:22

Hi Holger,

I only have ARIS 10.0.12 at my hand, but worked with ARIS 9.8 in the past and I'm 99% certain it works like described here with your ARIS 9.8 too:

The Aris Script classes Model and ObjDef inherit methods from the ARIS Script class Item.

Item, ObjOcc, CxnOcc and Attr all implment a method called "KindNum()", whose result you can compare with certain Constant.CID_*** values to find out what exact kind of object you're looking at.

With this distinction being made, you're no longer looking at a generic object, instead you know exactly to which class it belongs to and which specific methods are applicable for it.

You can then probably use

var methodInfo = ArisData.ActiveFilter();

which will assign an object of the Aris Script class MethodFilter to the variable methodInfo.

If you want the Object type in a human readable format:
The class MethodFilter extends the class ArisMetaModel and thus comes with useful methods such as AttrTypeName(...), ObjTypeName(...), SymbolName(...) and ModelTypeName(...), into which you just have to plug the type number to get the name as a string.

If you want the Object type in the form of a GUID (a machine readable format):
The class MethodFilter extends the class ArisMetaModel and thus comes with useful methods such as UserDefinedAttributeTypeGUID(...) and UserDefinedModelTypeGUID(...), into which yoyu just have to plug the type number to get the GUID number as a string. Admitteldly in my ARIS 10.0.12 API documentation I'm missing a method here for UserDefinedObjectTypeGUID(...), which seems like an oversight on SoftwareAGs end.

EDIT: You can also use the method getAPIName(...) of MethodFilter with any item kind to figure out the API-Name/GUID

Either way:
How you can get the type number differs a little bit for each class, I recommend checking the individual classes to find out how to do it. Just make sure to only use the methods of individual classes after you made sure the object is of that class, otherwise you'll get terrible method not found exceptions.

Hope this helps.

0
by Holger Reidemeister Author
Posted on Tue, 09/01/2020 - 06:39

Hi Kay,

it works fine. :-)

Many thanks for your support.

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock