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 - Jeff Bartels

Pages: [1]
1
Does anyone have any comments about why some of the EA events that can be trapped can be controlled (i.e. allowed or inhibited) via a Boolean return value, while others cannot (i.e. the required handler is a method with no return value)? I would love to be able to inhibit certain edits to Packages, Elements, and Connectors in my add-in.
More-specifically, I can trap a user attempt to change the stereotype of a Connector and decide to restore the stereotype to a value of my choosing, but the end result in EA is weird - the user-selected stereotype AND my corrected value are BOTH associated with the connector. Can't seem to find a property on the Connector object that I can manipulate to restore the stereotype to the ONE desired value.

Any suggestions?

2
I would like to know more about that book - what is the complete title?

3
Using the Package Element's GUID to retrieve the Package itself works fine!

So ...

Package.GUID = Package.Element.GUID

And ...

Package.Element.PackageID = Package.ParentID
Package.Element.ParentID = 0

Weird, but that is how the API works.

Hey! Where the heck is this documented, anyway?????

Thanks for the help, all  :)

4
Oh, I forgot to mention : the value of E.PackageID returned by the API is actually A.PackageID, not B.PackageID!

5
Given Package "B" residing in Package "A":

When I access the EA.Element instance in "B":
    Dim B as EA.Package ...
    Dim E as EA.Element = B.Element

And then try to access package "B" again from the attributes of E:
    Dim B_pkgID as Integer = E.PackageID

I do not get the same Integer value as B.PackageID.

Does anyone know how to get back to a Package from its owned Element (note that the Package's corresponding Element object ID is what is cached in the Client and Supplier ends of a Connector object.

The EA GUI seems to know how to do this. The API, however, does not.
Have I discovered a bug here???

6
Problems all solved, questions answered.
I'm using EA 10. The following calls create the desired element using our custom MDG:

        Dim elem As EA.Element = Nothing
        elem = DirectCast(pkg.Elements.AddNew("test", "Requirement"), EA.Element)
        elem.StereotypeEx = MDGInformation.ProfileName & "::" & MDGInformation.Stereotype
        elem.Update()

Calling AddNew with the profile name and stereotype string causes EA to throw and exception.

Finally, the tagged values that our MDG adds to the the Requirement object are accessible in the API via the TaggedValues property of the Element object, even though in the EA app the property window segregates the MDG-related tagged values from the TaggedValues property.

7
Thanks qwerty I'll try that out

8
I am developing an Add-In and have some questions about manipulating elements defined in a custom MDG technology from the EA API. I have been scouring the forums and EA user guide and am not finding any relevant information.

In essence, I need to be able to do the equivalent of the interactive Create Element operation in the Project Browser (4th icon from the left at the top of the PB frame) from an AddIn using the automation API. The associated interactive steps include:
- Selecting the active toolset
- Selecting the custom MDG element type



When examining the created element with the Element properties dialog, the element shows a setoff tagged values that is distinct from the standard set named "Tagged Values". I am also wondering how to get at this distinct set of Tagged Values using the API.


9
Thanks for the help - I was able to remove them from my user AppData folder.

10
How do I remove an item from the list of selectable MDG technologies in SETTINGS | MDG TECHNOLOGIES? I can't seem to find a way ... I removed the files from which I initially imported an MDG technology, can't find a direct EA command, can't find anything in the registry, etc.

The problem is that I have imported multiple versions of my custom MDG in the process of developing it, now I have a bunch of garbage in the list, and can't control what gets enabled/activated.

Pages: [1]