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 - Simon M

Pages: 1 ... 389 390 [391] 392 393 ... 434
ObjectType is a property of the automation interface, not the database.

For your tagged values it will return an enumeration value of otTaggedValue.  (Or something like that)

Looks like you aren't saving the Activity before trying to add it to the diagram.  So the ElementID will still be zero.

Add newActivity.Update();

I'm also no sure why you are doing currentElement.Update();, as it hasn't been modified anywhere in the loop.

Automation Interface, Add-Ins and Tools / Re: Add-In: difficult start
« on: December 23, 2010, 08:12:44 am »
But that's a bit tricky. So my question is: is there a way to register an add in for all users? (I tried to add the key in LOCAL_MACHINE and USERS\.DEFAULT and in both cases, it doesn't work).
Not in the current build.  We do have a change coming to allow add-in keys in LOCAL_MACHINE.

PS. I've looked at USERS\.DEFAULT before and I believe you have misinterpreted what it is for.

Basically no.  We don't support users specifying how to parse a custom language.

Automation Interface, Add-Ins and Tools / Re: Updating the Glossary
« on: December 13, 2010, 08:28:34 am »
GetByName is not supported for all collection types.  You'll need to iterate over the collection and check each name.

Remove something from Diagram.DiagramObjects would be the only way.

Any chance you can get them as a spreadsheet?

Then you will be able to use the csv import functionality.

No, there isn't.

Then I don't think you can do it without writing an add-in and getting that to format your notes for you.

You may be able to use WRAP_LINES.

WRAP_LINES(<text>, <wrap_length>, <start_string>[, <end_string])

Wraps <text> as designated to be <wrap_length>, adding <start_string> to the beginning of every line and <end_string> to the end of the line if it is specified.

The documentation suggests that it should work.

ActivateDiagram (long DiagramID)
 Activates an already open diagram (that is, makes it the active tab) in the main Enterprise Architect user interface.

as opposed to

OpenDiagram (long DiagramID)
 Provides a method for an automation client or Add-In to open a diagram. The diagram is added to the tabbed list of open diagrams in the main Enterprise Architect view.


DiagramID: Long - the ID of the diagram to open.  

Okay, I'll got one step further with an option that may work but is a bit ugly.

Code: [Select]
CurrentID = Repository.GetCurrentDiagram().DiagramID
if(Repository.GetCurrentDiagram().DiagramID == DiagramID)
  IsOpen = True

On a diagram.
Copy (Ctrl+C)
On a diagram in the target package.
Paste as New (Ctrl+Shift+V)

Currently can't be done.

Automation Interface, Add-Ins and Tools / Re: Add-in in Java?
« on: November 19, 2010, 08:35:12 am »
The short answer is that we have written code to allow Java to call the EA COM objects by wrapping them with Java objects and JNI calls.  (Actually, apart from a small amount of support code this was generated using EA Transformations and Code Generation.)

The code to allow EA to call into Java is completely separate and although I have my theories on how it can be done, it hasn't been done.

Pages: 1 ... 389 390 [391] 392 393 ... 434