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 - Knut Paulsen

Pages: 1 [2] 3
16
Automation Interface, Add-Ins and Tools / EA problem in IIS service
« on: June 23, 2015, 08:44:28 pm »
Hi guys,
hope you can help me with this one :-)

I have a service running under control of IIS in which I try to create an EA Repository object. I get the below error.  Anybody have any experience using EA this way? I do stuff before the error occur, so the service as such is working. It basically fails when I try to create any EA object.

Any help will be appreciated :-)

Line causing the error: EA.Repository repo = new EA.Repository();


Error:
An unhandled exception of type 'System.ServiceModel.FaultException`1' occurred in mscorlib.dll

Additional information: Retrieving the COM class factory for component with CLSID {67F4E0FA-46A7-4255-B084-69A9433D08C3} failed due to the following error: 80040153 Invalid value for registry (Exception from HRESULT: 0x80040153 (REGDB_E_INVALIDVALUE)).

17
Hi guys,

I would like to drag an item from the project browser onto a homemade tab control. I have included a panel to react to the drop event and when I run this in a windows forms application it works fine.

But, inside EA it appears that EA interferes with the drag and drop action (obviously). So, I can select an item, e.g. a use case and start dragging it, but when I drop it over my drop-enabled panel EA displays a message box saying "There is no current diagram to perform this operation. Please select a diagram first."

Any ideas of how to capture the drop in my code without EA bothering about it?

Cheers
Knut


18
Automation Interface, Add-Ins and Tools / Users logged in to EA
« on: March 23, 2015, 05:19:36 pm »
Hi guys,
When user security is enabled, is there any way to determine if a given user is logged in or not using the API or a database lookup?

Cheers
Knut

19
Automation Interface, Add-Ins and Tools / Find running instances of EA
« on: November 05, 2014, 11:36:41 pm »
Hi guys,

I want to find and access instances of EA already running on my computer. Using Microsoft.VisualBasic.Interaction.GetObject (from C#), I get one instance and it appears to be the 'oldest' one.

Any suggestion how I can find them all, and get hold of the repository object?

cheers
Knut

20
Hi guys,

I'm getting into a habit of running into problems every friday afternoon :-)

I wonder if any of you have ever seen this behavior before:
I am running a debug session in VS Express 2012 for Windows Desktop.
I have a pretty long running task of importing stuff into EA, and sometimes, not always, it stops. The code is within a try/catch block, but it appears not to be an exception that I can catch. I get a dialog box telling me something bad has happened, full content is copied below. Apparently a thread has stopped for some reason that I do not understand and it is not my main working thread. If I switch to my thread in the debugger the topmost frames on the call stack are just presented as '[External code]' and the first frame that is 'mine' is busy with this statement: foreach (EA.Package package in parent.Packages).

I do notice that the output window says a NullReferenceException occurred in my program, but the parent variable in my code line is NOT null and I have already imported dozens of packages and elements into it. So form what I can see, this NullReferenceException must occur inside Enterprise Architect code.

Any ideas?

Full error description from VS:
A first chance exception of type 'System.NullReferenceException' occurred in IREAWizard.exe
The thread '<No Name>' (0x221c8) has exited with code 0 (0x0).
Managed Debugging Assistant 'DisconnectedContext' has detected a problem in 'C:\My Projects\TOOLSBYKNUT\IREA\IREAWizard\bin\Debug\IREAWizard.vshost.exe'.
Additional Information:
Transition into COM context 0x874478 for this RuntimeCallableWrapper failed with the following error:
  System call failed. (Exception from HRESULT: 0x80010100 (RPC_E_SYS_CALL_FAILED)).

This is typically because the COM context 0x874478 where this RuntimeCallableWrapper was created has been disconnected
or it is busy doing something else.
Releasing the interfaces from the current COM context (COM context 0x874308).
This may cause corruption or data loss.
To avoid this problem, please ensure that all COM contexts/apartments/threads stay alive and are available for context transition,
until the application is completely done with the RuntimeCallableWrappers that represents COM components that live inside them.

Cheers
Knut

21
Guys,
I'm kind of stuck on a friday afternoon. Maybe that is why I am stuck :-)

Anyway, I want to move a package containing lots of subpackages and elements and stuff from package A to package B. Is there a way to that via the API? Or is it only the hard way?

br
Knut

22
Hi guys,

I am using 'App eaApp = (App)Microsoft.VisualBasic.Interaction.GetObject(null, "EA.App");' to get to a running EA.exe and it works fine. What I am wondering about is what happens if I have a number of EA instances running? I want to find out if a particular project is already running, not just any project.

Any suggestions?

thanks for any help
Knut

23
Hi guys,

I have a bit of trouble creating custom diagram type from my MDG.

I have created an MDG profile with language elements and diagram profiles. All this works very nice when I use it inside EA, but when I try to create one of my diagrams types via the API, I cannot figure out what to specify for the type parameter to the AddNew call.

I have tried every combination I can think of
  • Stereotype name

Metaclass name
alias
DiagramID
with or without my profile name in front
[/list]

the diagram ends up as a Class or Custom diagram, and consequently, the incorrect toolbox is displayed.

I have read the Scripting EA book, but his example only creates a class diagram, and if I try that it works well. So, only failing for my homegrown diagram types.

any ideas?

br
Knut

24
Hi guys,

I have a stand-alone windows program that opens a number of EA repositories in sequence searching for some stuff. If, for some reason, I supply invalid user name or password, EA pops up the login dialog asking for this information. Also, if the ODBC entry does not exist, EA pops up a dialog asking for a password.
Is there any way to avoid these dialogs? I would rather have an exception that I could handle and then move on to the next repository.

Thanks for any help :-)

25
Automation Interface, Add-Ins and Tools / Resizing of Add-In window
« on: June 03, 2013, 08:52:04 pm »
Hi guys,

I have this control that I display in an Add-In window using Repository.AddWindow().  I would like the components inside my control  to re-size whenever the Add-In window is re-sized, but I am unable to find the size of the surrounding dockable window. Control's parent property is null. Any ideas?

cheers
Knut

26
Automation Interface, Add-Ins and Tools / Currently logged users
« on: May 31, 2013, 06:28:51 pm »
Hi guys,

Is there a way to find out exactly which users are logged on to a specific project right now?

Cheers
Knut

27
Hi guys,

I want to add a hyperlink element to my toolbox, but I cannot find a suitable base metaclass.

If the above problem is solvable, then I would like to decide that this link is to another diagram, have the diagram selection dialog open automatically and add a default text to the notes field. Possible?

Cheers
Knut

28
Hi guys,

I am trying to add a document element to my toolbox and I don't understand how to accomplish this. I am able to add an Artifact element, but then I need to create the linked document manually. Additionally, I would also like to decide the document template used for the linked document.

Any ideas?

Cheers
Knut

29
Hi guys,

I have added a control using the AddTab method. I would really like to know when the user decides to close this tab. Like if the user closes a diagram, the EA_OnPostCloseDiagram event is fired.

Any suggestions?

Cheers
Knut

30
Automation Interface, Add-Ins and Tools / Audit trail data
« on: October 04, 2012, 07:37:51 pm »
Hi guys,

does anybody know where the audit trail data is stored?
And if it is encoded in any way?

Cheers
Knut

Pages: 1 [2] 3