Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Bex

Pages: [1]
1
Hi,

I'm using EA 7.1 with the MDG Technology for SysML 1.0 and I cannot see how to realize an information flow on a connector between flowports on an Internal Block Diagram.

The help indicates that by right-clicking you can select Advanced > Information Flows Realized... but there are no information flows to "realize" in the dialog.

I must be doing something wrong as the SysML example that ships has them but I can't see where I'm going wrong.

Any ideas?

Thanks.

2
Automation Interface, Add-Ins and Tools / Re: Accessing Auto Counters
« on: December 17, 2008, 02:51:19 am »
As an update, the auto counters can be read by accessing the table t_trxtypes through the SQLQuery but I still can't see how they could be updated from code.

This is now becoming a show stopper, any ideas anyone?

Thanks

3
Automation Interface, Add-Ins and Tools / Accessing Auto Counters
« on: June 25, 2008, 03:15:18 am »
Hi Folks,

I've searched the API documantation to no avail so I'm wondering if anyone knows how to access the Auto Counters via the Automation Interface?

It's not a show stopper for me but it would be nice!

Cheers,
Bex

4
Hi Thomas,

Sorry for the delay in replying but your "2nd time lucky" approach worked!

So to summarise the steps:

1. Create the Element "Requirement"
2. Apply the Profile to the newly created element for the first time
3. Update the element
4. Apply the profile for a second time
5. Refresh the tagged values collection
6. Access and set each tagged value

Many thanks for your assistance :)



5
Hi,

Thanks for your replies. Maybe naively I thought that by applying a profile the tagged values would appear on the stereotyped element. I thought I could do something like:


EA.Element theReq = inPackage.Elements.AddNew("A Requirement", "Requirement") as EA.Element;
theReq.Stereotype = "Engineering";
string theResult = _Repository.CustomCommand("Repository", "SynchProfile", "Profile=MyProfile;Stereotype=Engineering");
          
theReq.Update();

EA.TaggedValue  theTV = theReq.TaggedValues.GetByName("myTaggedValue") as EA.TaggedValue;
theTV.Value = "Set to a value";
theTV.Update();

The problem is that theReq tagged values collection always has a count of zero....

I would like to create the tagged values this way so that they are not hard-coded but are defined by the profile.

Thanks,
Bex

6
Hi midnight,

I'll give that a try but I have the impression I'm missing something obvious. I read the thread regarding the "undocumented" SynchProfile custom command and it would appear that the poster was doing something similar to my add-in.

Thanks.    

7
Hi all,

My EA 7.1 add-in performs the following steps:

1) Create a new element in the repository
2) Set its stereotype (as defined in a pre-loaded profile, that is visible in the toolbox)
3) Synch the repository using the Repository.CustomCommand("Repository", "SynchProfile", "Profile=MyProfile;Stereotype=StereotypeName")
4) Attempt to get the TaggedValues collection from the element to set each tagged value's value
5) Update the element

The collection always returns empty but if I look at the newly created element (within EA) it has the tagged values as defined by the profile :-[

I have tried updating and refreshing the element prior to attempting to access the collection of tagged values, used both TaggedValues and TaggedValuesEx but the collection is always empty in my add-in yet they are visible in EA.........any ideas?

Thanks.


8
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.

9
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!

10
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...

11
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.....? :-[

Pages: [1]