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
181
If you use Connector.Ster[highlight]e[/highlight]otype it should work I guess.

Geert

182
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

183
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

184
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

185
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

186
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

187
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

188
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

189
Hi,

I have a Windows.Forms.RichTextBox in a control that I added as an add-in window in EA.
This all works nice untill I press the escape key. Then suddenly my RichTextBox doesn't accept enter or tab keys, and it doesn't launch the TextedChanged events anymore.
I've been trying to figure out what happens for a while now but I can't find anything.
I still receive all the key events for the enter key, the RichTextBox is not disabled or readonly, and it still has the focus?!?
Is EA doing something as a reaction to the escape key that somehow messes up my RichTextBox?
When running this RichTextBox in my own window I don't have any such problems.

Anyone an idea? I've also sent a bug report to Sparx.

Geert

190
Automation Interface, Add-Ins and Tools / Repository.CloseWindow?
« on: September 06, 2011, 10:40:46 pm »
Does anyone know if there's some kind of workaround to close the an add-in control window added by Repository.AddWindow()?

Geert

191
Hi,

I'm writing an add-in that inlcludes a control with a RichtTextBox in it to edit text.
To enable simple editing of the text I included code to use Ctrl-B for bold, Ctrl-I for italic and Ctrl-U for underline.
When I run this control in my own window then that works fine, but when I run it as the Add-In window in EA then it doesn't work.
For some reason EA seams to steal my Ctrl+key keypress, the only thing I get it the Ctrl keypress, not the Ctrl+B
Anyone know how to fix this? Here's my code:
Code: [Select]
/// <summary>
        /// fired when a key is pressed on one of the textboxes.
        /// Handles:
        /// - Ctrl-B -> Bold
        /// - Ctrl-U -> Underline
        /// - Ctrl-I -> Italic
        /// </summary>
        /// <param name="sender">the textbox firing the event</param>
        /// <param name="e">the arguments</param>
        private void textBox_KeyDown(object sender, KeyEventArgs  e)
        {
            //debug
            ACVModellingTools.Util.Logger.log("textBox_KeyDown info: Control = " + e.Control.ToString() + " keyCode =" + e.KeyCode.ToString() );

            RichTextBox textBox = sender as RichTextBox;
            // Bold = Ctrl-B
            if (e.Control && e.KeyCode == Keys.B)
            {
                this.toggleBold(textBox);
                e.SuppressKeyPress = true;
            }
            //Italic = Ctrl-I
            else if (e.Control && e.KeyCode == Keys.I)
            {
                this.toggleItalic(textBox);
                e.SuppressKeyPress = true;
            }
            //Underline = Ctrl-U
            else if (e.Control && e.KeyCode == Keys.U)
            {
                this.toggleUnderline(textBox);
                e.SuppressKeyPress = true;
            }
        }

Geert

192
Hi,

Does anyone have a working C# example of an add-in using the repository.AddWindow() functionality?
I'm having a bit of trouble getting the this functionality to work.

Geert

193
I've added a new feature to the EA Navigator to navigate to the implementation of an operation. It selects the Behavior element in the project browser and opens all diagrams owned by this behavior element.
More details on my blog
or download the EA Navigator 1.2 Windows Installer directly from github.

Geert

194
I've added a new feature to the free and open source addin EA Navigator 1.2. You can now navigate from operations to the CallOperationActions calling this operation.
More details on my blog
or download the EA Navigator 1.2 Windows Installer directly from github.

Geert


195
I'm writing a tool to move operations from one class to another.
The question: what is the best way to do this.
When using the API I can remove the operation from the source.Methods collection, and then add a new operation to the target.Methods collection, but then I need to copy each and every detail of the operation to the new operation (including parameters, tagged values, etc...).
What I really want to do is just overwrite the Method.ParentID with the ID of the target element.
Sadly this property is readonly :(

The more "dirty" way would be to change the parentID directly in the database. This would avoid the whole copy/paste stuff, and it would keep all references I've put into the model (because the id's would stay the same).

Do any of you see any problems with the "dirty" database approach?

Thanks

Geert

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