Author Topic: 'Parameter Values' in Message Properties dialog  (Read 6907 times)

Bex

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
'Parameter Values' in Message Properties dialog
« on: April 03, 2008, 02:13:28 am »
Hi All,

Does anyone know how to access the Parameter Values displayed on a message in an Object Sequence diagram? For example, Object1 sends a message (calls) Object2:Math.Add(P1: int;P2 : int) : int

In the Message Properties I can specify that the values are say 1 and 2 for P1 and P2.

I can get hold of the operation profile by using the Misc_Data (probably not recommended):

string md1 = theConnector.get_MiscData(1);

and also via the connector's properties:

EA.Properties prop = theConnector.Properties;

foreach (EA.Property thePropery in prop)
{
    string name1 = thePropery.Name;
    EA.ObjectType ot = thePropery.ObjectType;
    EA.PropType p = thePropery.Type;
    string valid = thePropery.Validation;
    object val = thePropery.Value;
}

but I just can't find the actual parameter values.

Any ideas.....? :-[

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: 'Parameter Values' in Message Properties dialo
« Reply #1 on: April 03, 2008, 02:22:35 am »
Don't know for sure Bex, but perhaps it is in the RunState of the message.
No, you can't have it!

Bex

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: 'Parameter Values' in Message Properties dialo
« Reply #2 on: April 03, 2008, 04:23:07 am »
Thanks for your reply Midnight but I can't find any reference to RunState in the Connector properties.
I'm assuming that the Connector is the right interface to use to access the message on the sequence diagram by the fact that I can get hold of info about the message e.g. its profile...

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: 'Parameter Values' in Message Properties dialo
« Reply #3 on: April 03, 2008, 05:46:07 am »
The weird part is that I know I've stumbled over this recently. I just cannot remember where. I keep thinking one of the tables had a series of values separated by semicolons, and the values were in there.
No, you can't have it!

Bex

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: 'Parameter Values' in Message Properties dialo
« Reply #4 on: April 03, 2008, 06:02:13 am »
Accessing the EA.Connector:

    string md1 = theConnector.get_MiscData(1);

gives the following:

"retval=int;params=;paramsDlg=P1, P2;retatt=Add;"

Which defines the profile of the operation but alas not the actual parameter values - hopefully it''ll come to you in a moment of inspiration!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: 'Parameter Values' in Message Properties dialo
« Reply #5 on: April 03, 2008, 08:51:54 am »
Check your PM Bex.
No, you can't have it!

Bex

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: 'Parameter Values' in Message Properties dialo
« Reply #6 on: April 04, 2008, 08:44:48 pm »
Thanks to Midnight, the answer is to access:
    t_connector.StyleEx

This yields the following:
    aliasparamsTO=int, int;paramvalues=3,2;

allowing the actual parameter values to be obtained.

Once again, many thanks to Midnight for his support.

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: 'Parameter Values' in Message Properties dialo
« Reply #7 on: April 04, 2008, 08:51:30 pm »
Is there no other way than to get it from the database? This would be a crying shame.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: 'Parameter Values' in Message Properties dialo
« Reply #8 on: April 05, 2008, 12:31:14 am »
Frank,

The point Bex makes is that you can get at it from the API. Grab a reference to the Message - it is a type of connector - and use the StyleEx property.

David
No, you can't have it!

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: 'Parameter Values' in Message Properties dialo
« Reply #9 on: April 05, 2008, 01:47:57 am »
Quote
The point Bex makes is that you can get at it from the API. Grab a reference to the Message - it is a type of connector - and use the StyleEx property.

Ah, allright. Didn't get that. "t_connector" made me think it was about a table.

It's still a shame that all these StyleEx and CustomCommand things are hardly documented at all.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: 'Parameter Values' in Message Properties dialo
« Reply #10 on: April 05, 2008, 02:52:40 am »
Well, it is also a table Frank. You can do it both ways.

I totally agree with you about the lack of documentation. Around the time of 6.5 they seemed to be making an effort. This is where the SDK seems to have sprung from. Since then they've been trying to get the rest of the product documentation up to snuff, at tall order indeed. Somehow the nascent SDK got itself reincorporated into the main documentation set. They've improved it when they've had time, but it needs to be written again, from top to bottom (in whichever order).

As near as I can see, the only documentation of the attribute I cite above is out of date. It says the attribute is not used. Sometime around EA 7.0 this statement appears to have become obsolete.

David
No, you can't have it!