Print enumeration attribute in an opaque behavior

Moderator: Moderators

Print enumeration attribute in an opaque behavior

Postby douglas.courtney@navy.mil » Thu Mar 16, 2017 9:29 pm

When I try to print an attribute that was passed into an opaque behavior. When I print the variable, I get an address object.

tType = ALH.getValue(taskOrdData, "TaskType")
print(tType)
print(str(tType))

Console output:
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.impl.EnumerationLiteralImpl@2253cdb9
com.nomagic.uml2.ext.magicdraw.classes.mdkernel.impl.EnumerationLiteralImpl@2253cdb9

I have tried using the str() function and also tried to use the .value. Any helpful hints.
douglas.courtney@navy.mil
Forum Newbie
Forum Newbie
 
Posts: 16
Posts Rating:2
Joined: Thu Oct 13, 2011 11:26 am

Re: Print enumeration attribute in an opaque behavior

Postby alvin.murphy@navy.mil » Thu Aug 09, 2018 9:04 am

What this problem ever resolved? I'm having the same issue.
alvin.murphy@navy.mil
Forum Newbie
Forum Newbie
 
Posts: 8
Posts Rating:1
Joined: Thu Mar 23, 2017 7:16 am

Re: Print enumeration attribute in an opaque behavior

Postby ivan.baeriswyl@hefr.ch » Fri Sep 27, 2019 6:45 am

I am also interested by a solution to this issue.
ivan.baeriswyl@hefr.ch
Forum Newbie
Forum Newbie
 
Posts: 6
Posts Rating:1
Joined: Wed Dec 12, 2018 12:39 am


Return to Cameo Simulation Toolkits

Who is online

Users browsing this forum: No registered users and 1 guest