Book a Demo

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 - Kevin Winchester

Pages: [1]
1
Thanks for the explanation - that is very helpful!

I experimented with (what I think) is a very similar setup to yours - that is, I created a .NET Windows Forms UserControl (which can act as an ActiveX control), and used an EA AddIn menu command to invoke it with the AddTab method.  However, I did not get any speed up of my processing - the command actually ran slower from the ActiveX control.

That led me one more question that should be quick for you to answer.  Once you call AddTab to create the ActiveX control, do you pass the actual EA.Repository object to the control, or do you pass a string that is a filename to open with the Repository.OpenFile() method?  And is that any different from when you work without the ActiveX control?

Thanks again,
Kevin


2
Hi,

I have been attempting to improve my .NET AddIn performance for a while now.  Thus I am very interested in your results.  Can you give more details about the organization of your code?

It would be very helpful if you could even post the code for your experiment, to show the difference between performing your document generation with a dialog or an ActiveX control (of course you would not need to include any of your document generation code - just the AddIn/ActiveX code).

Thank you,
Kevin

3
I have been creating foreign key connectors through the automation interface, by attempting to duplicate a connector that I imported from an ODBC data source.

This process seemed to work fine, until I ran the "Connectors" Project Data Integrity check, which informed me that my connectors were "Missing Foreign Key Information".  I started investigating, and found that FK connectors are given special text in the StyleEx property of the Connector object.  Something of the form:

FKINFO=SRC=FK_Name:DST=PK_Name:;

However, this is not documented anywhere that I could find (the EA Help file indicated that StyleEx was not used for Connector objects).  Once I adjusted my code to emit the proper string to that property, the Integrity check stopped failing.

Is that the proper way to create FK links through the automation interface?  Is there any documentation somewhere that would explain all of the necessary steps for doing this (in case I missed anything else)?  Is the syntax of the above string guaranteed to be stable between EA versions?

4
Automation Interface, Add-Ins and Tools / Re: Connector Update Speed
« on: February 14, 2008, 05:20:10 am »
Thanks for the reply.

I am comparing connectors by looking at a number of features of the connector (Type, ConnectorEnd roles, etc.).

I have since improved the code somewhat by checking the existing value of the connector properties and not calling Update() unless I am changing something.  This helps in the case of a connector that doesn't need any changes.

In general, I guess there isn't any magic speed trick that will make a large difference, other than accessing the project database directly.

5
Automation Interface, Add-Ins and Tools / Connector Update Speed
« on: February 06, 2008, 12:32:34 pm »
I am developing some automation interface (C#) code to create and update connectors, and it seems to take a very long time to execute.

The standard pattern of the code is:

- For each connector in an element:
 - if (this connector == the connector to update)
   - keep a reference to the connector and break
- end loop

- if reference to connector is null
 - AddNew connector and keep the reference
- endif

- write to the connector properties (e.g. stereotype)
- update the connector
- write to the connector ends
- update the connector ends
- add/update some tagged values to the connector
- update & refresh the tagged values

Is this a good way to be performing these addition/updates?  Is there some way to enhance the speed?

6
Thanks for the help, but I don't think the Diagram class will give me what I need.  I am looking for a way to show attributes on some elements in a diagram but not on others.  Therefore, I do not want to affect the entire diagram.

If there was an easy way to do it, I would expect it to be in the DiagramObject class, but there doesn't seem to be much in there except position and z-order properties.

I guess I will just have to work with what I have.

Thanks again for the help,
Kevin

7
I'm sorry, I don't think I was clear enough in my original post.

The Visibility property on attributes and methods is for making the feature Public or Private.  I am looking for a way to adjust the appearance of the feature on a diagram.

If I right-click an element on a diagram, there is a "Set Feature Visibility" menu item that brings up a dialog that can show or hide various element features on the diagram.  It does not affect the element itself (or its features), it only affects the diagram.

Is there any way to access this functionality from the automation interface?

8
Is there any way to access the Set Feature Visibility functionality through the automation interface?

I am creating diagrams and would like to adjust the visibility of attributes and operations on some elements on the diagram.

Pages: [1]