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.


Topics - Geert Bellekens

Pages: 1 ... 11 12 [13] 14 15
181
Hi,

I have defined a stereotype for Classes and attributes, and I added a boolean tagged value to both.

Now I would like to somehow visually indicate when this boolean is true on an attribute.
If needed I'm willing to re-write the whole attribute compartment, but I'm not sure if that is even possible.

Anyone know of a way to achieve that? I'm coming up blank :-/

Geert

182
I'm making a UML profile and I would like to define a new connectortype that can be used from an Element to another Element, but also between a Connector and an Element.

Sort of like the connector between an AssociationClass and the Association, or between a constraint and a connector.
Does anyone now how to do that?
The connector steretoype I defined only works between Elements.

Thanks

Geert

183
Does anyone know the secret formula to add something to the scenarioStep.UsesElementList
I tried with element.Name and element.ElementGUID as parameters, but that doesn't seem to work.
I think the whole UsesElementList simply doesn't work because it is always empty, even if I added linked elements in the uses column manually.
If in anyway possible I would like to avoid having to change the xml in the t_objectscenarios.XMLContent

Here's what I have in the code so far.
Code: [Select]
     for each usecase in usecases
            dim scenario as EA.Scenario
            for each scenario in usecase.Scenarios
                  dim scenarioStep as EA.ScenarioStep
                  for each scenarioStep in scenario.Steps
                        dim matches
                        set matches = regExp.Execute(scenarioStep.Name)
                        dim classesToMatch
                        set classesToMatch = getClassesToMatchDictionary(matches, dictionary)
                        dim classToMatch as EA.Element
                        for each classToMatch in classesToMatch.Items
                              Session.Output "usesElementList before: " & scenarioStep.UsesElementList.Count
                              scenarioStep.UsesElementList.AddNew classToMatch.Name, classToMatch.ElementGUID
                              scenarioStep.Uses = scenarioStep.Uses & " " & classToMatch.Name
                              scenarioStep.Update
                              scenarioStep.UsesElementList.Refresh
                              Session.Output "usesElementList after: " & scenarioStep.UsesElementList.Count
                        next
                        Session.Output matches.Count & " matches found for step " & scenarioStep.Name
                  next
            next
      next

Thanks

Geert

184
Suppose I have a folder with 10 use case diagrams, and I only want one of them to show up in my document. How do I do that?

I'm having a lot of fun writing really complex document templates, and I did find solutions for almost all of the challenges I faced, but I'm having a hard time coming up with a solution for this one.

In case it isn't possible I'll send in a feature request, but before I do I wanted to check if maybe someone else has a solution.

Thanks

Geert

185
I'm using a model document in a virtual document.
In the tagged values of the model document I put the name of an SQL search and search value.
This results in a set of elements want to be in my document.
Now, no matter what I try, I cant seem to be able to change the sort order of the elements in the document.
Not by changing the sort order in the template, not by changing the sort order in the options when generating, and not by specifying an "order by" in my SQL.
No matter what I do the elements are always sorted by their Object_ID

Does anyone know the secret handshake to make EA sort my elements correctly, or should I report this as a bug?

Thanks for your input

Geert

186
Hi

I'm using Repository.RefreshModelView(packageID) with the packageID of the package I want to reload (because I played with the treepos of the elements in the package)

This seems to work, except that it also reloads all my opened diagrams.
I haven't tested this in a previous version yet, but I don't think this used to behave like this?

I would like it to do exactly the same as right click|contents|Reload Current Package

Anyone notice this as well, and maybe has a workaround?

Geert

187
For those interested in scripting, I'm presenting the Sparx Systems webinar next week (2015-05-07) about scripting.

More info and registration at http://www.sparxsystems.com/resources/webinar/partners/scripting/scripting-introduction-bellekens.html

Geert

188
If you use Connector.Ster[highlight]e[/highlight]otype it should work I guess.

Geert

189
Hi,

Anyone know if it is possible to include the image of a diagram in the custom section of a RTF script template fragment?

I know how to get elements and output their properties using a script, but I would also like to add a diagram to my template.

Geert

190
Anyone have an idea how to refresh the scripts in EA from an add-in?.
The script view has a button called "Refresh Script Tree" that does exactly this, but I don't think this is exposed in the API.
I've also tried to reload the model, but that doesn't help.

Geert

191
I've finally come around to writing a bit of explanation on how to use my framework for EA Add-ins.
How to use the Enteprise Architect Add-in Framework

Geert

192
Automation Interface, Add-Ins and Tools / Re: EA MainTab Title setting
« on: January 09, 2013, 07:51:40 pm »
I don't really see anything obvious that allows you to have an impact on that.

Geert

193
Automation Interface, Add-Ins and Tools / get element from scenario
« on: April 06, 2012, 09:44:27 pm »
For some reason they "forgot" to add the elementID to the scenario class in the API.
So I had to make a workaround to get the actual element.
For anyone else trying to figure this out:
Code: [Select]
       public UMLUsecase useCase
        {
            get
            {
                string sqlQuery = @"select o.ea_guid as CLASSGUID, o.Object_Type as CLASSTYPE,o.Name from (t_object o
inner join t_objectscenarios os on os.Object_ID = o.Object_ID)
where os.ea_guid = '<Search Term>'";
                List<object> results = this.model.SearchSQL(sqlQuery,this.wrappedScenario.ScenarioGUID);
                if (results.Count > 0)
                {
                    return results[0] as UMLUsecase;
                }
                else
                {
                    return null;
                }

            }

        }

Geert

194
Does anyone have ready made code to copy a sequence diagram?
From what I see now I'll have to:
  • copy owned elements (notes and fragments)
  • copy diagramObjects
  • copy messages
  • copy diagramLinks

Geert

195
I've added a feature to my free and open source add-in EA Navigator to select an element in the project browser based on its node path (FQN).

See http://geertbellekens.wordpress.com/2011/11/22/select-a-model-element-from-its-node-path-fqn-with-ea-navigator-1-3/ for more info or go directly to https://github.com/downloads/GeertBellekens/Enterprise-Architect-Toolpack/EANavigator_Setup_1.3.msi to download the msi setup file

Geert

Pages: 1 ... 11 12 [13] 14 15