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 - Geert Bellekens

Pages: 1 ... 479 480 [481] 482 483 ... 541
7201
It doesn't seem like this is exposed by the API, so the only way I see it to create it in the database using sql update statements and Repository.Execute()

Geert

7202
I reported this as a bug and received following answer
Quote
Hello Geert,

We can confirm that EA currently provides default handling for a number
of different key combinations.  Unfortunately our developers indicate
this behavior is not likely to change in the immediate future.

We have logged a feature request on your behalf for better access to
keypress events from add-in window controls, but cannot say at this time
if/when such changes may be implemented.

Thank you for your feedback.  Sorry we could not be of more assistance.

Best regards,
:(

Geert

7203
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

7204
Automation Interface, Add-Ins and Tools / Re: Association Class
« on: August 23, 2011, 09:37:19 pm »
Hmm, I don't think using java or .net should make a difference.
Are you sure you're on the latest version (9.0.908) I think this property is fairly recent.

Geert

7205
Automation Interface, Add-Ins and Tools / Re: Association Class
« on: August 23, 2011, 04:41:50 pm »
You get the connector id from the property Element.AssociationClassConnectorID and then you use Repository.GetConnectorByID to get the actual connector object.

Geert

7206
Automation Interface, Add-Ins and Tools / Re: Last Modification Date
« on: August 24, 2011, 04:38:01 pm »
Have you tried to explicitly get the different dateparts from the modified date?
(I know, that will be even more vendor specific)

Geert

PS. There is an indicator in the connectionstring that you can use to figure out wich kind of database you are working on.

7207
Automation Interface, Add-Ins and Tools / Re: Last Modification Date
« on: August 17, 2011, 05:09:32 pm »
Mark,

I believe EA only keeps the "last modification date" on Elements.
That is to say, it only updates that date if the actual element object has been updated, and it doesn't look an any of the owned elements/features of that element.
So changing something to an attribute will not change anything on the element and thus will not update the modification date.

Although it isn't really precise, I think it still can be used to get a rough idea of when this model was last changed.

BUT, traversing the whole model using the API will be a nightmare performance wise. (it will take hours and hours for even a moderately large model).

So the only feasible option I can think of is to use an SQL query.
You can use the Repository.SQLQuery() operation to execute your own random query to the database without worrying about database connectors and stuff like that.

I just noticed diagrams have a modified date as well, so you might want to use that as well.
So launching something like
Code: [Select]
select MAX(o.ModifiedDate) from t_object o
and
Code: [Select]
select MAX(d.modifiedDate) from t_diagram dand selecting the largest data from those two will probably work a lot better (and in a fraction of the time)

If you really need an exact date I guess the only option is to turn auditing on.

Geert

PS. the date in 1899 is the equivalent of "0" or in other words "empty"

7208
Hi,

What you'll need to do is create connectors of the correct type between the objects shown on your diagram.
Then in most cases (except for sequence diagrams I think) the connectors will be shown automatically on every diagram that shows both ends.
It might be necessarily for sequence diagrams to add a DiagramLink to explicitly tell it to show.

Geert

7209
Yes, all of that is possible.
Sadly enough I don't have time right now to do it for you :'(

Geert

7210
You'll need to query
t_object, join it with t_package for the owning package then join t_package a couple of times to get get the subpackages
and then join with t_DiagramObjects and then t_Diagram.

Geert

7211
yes it is possible.
No I don't have something like that yet

geert

7212
In that case you'll have to sort the collection yourself (have you looked at the treepos property?)

Geert

PS. If Sparxians are asking for version and build they mean something more specific like version 9 build 908


7213
I think in most cases the Element.Elements collection already returns you the correct order.
If not so check the Element.pos property.
It could also be that you have configured the elements (or features) to show up in alphabetic order, in that case you'll probably have to sort the collection yourself.

Geert

7214
Automation Interface, Add-Ins and Tools / Re: Error when calling Addin
« on: August 16, 2011, 04:26:11 pm »
Mark,

The error says "invalid parameters"
Your operation requires a parameter of type EA.Repository, but I don't see you passing that anywhere (or is that done by EA?)
Isn't there somewhere  simple example available?

Geert

7215
Hi,

How would you define "belong to"? I've never heard of an element belonging to a diagram.
If you want to see on which diagrams an element is shown then you better use an SQLQuery()

Geert

Pages: 1 ... 479 480 [481] 482 483 ... 541