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 - Anna

Pages: [1]
1
General Board / Code generation / getter and setter
« on: February 25, 2002, 07:16:31 am »
Hello

Thanks for the great program :)

My question is, is there a way to make the code generator generate java getter and setter methods for all the attributes in the class ?

TIA

2
Automation Interface, Add-Ins and Tools / Re: AddDefinedSearches
« on: October 08, 2008, 03:43:43 am »
Thanks, you helped me a lot.
I had trouble getting that lot information into one string, but since i knew it have to be possible i got it.

3
Automation Interface, Add-Ins and Tools / AddDefinedSearches
« on: October 03, 2008, 02:15:20 am »
Hi,

how do i use the Method AddDefinedSearches in the correct way?
I tried it with a filename as used for ImportPackageXMI, but i allways got an error message.

The format of the filename should be ok, i use the same format for ImportPackageXMI and it works fine. The File itself should be ok too, i exported it with "Manage Seaches".

Quote
Error:
Code = 0xc00ce556
Source = Line : 1; Char : 1
Error Description = Invalid at the top level of the document.

Code: [Select]
Sub AddDefinedSearchesTest()
    Set rep = GetObject(, "EA.App").repository
    searchstring = "C:\Search.xml"
    rep.AddDefinedSearches searchstring
End Sub

Quote
AddDefinedSearches (string sXML)
  
 Enables you to enter a set of defined searches that last in Enterprise Architect for the life of the application. When Enterprise Architect loads again they must be inserted again by your Add-In.

Parameters:

sXML: String - the XML of the defined searches; you can get this XML by performing an export of the searches from the Manage Searches dialog in Enterprise Architect.  

Any Ideas, whats wrong with it?

Thanks!
Anna

4
Automation Interface, Add-Ins and Tools / Re: How to add a package
« on: September 23, 2008, 10:42:59 pm »
Thanks, the downgrade helped a lot.

5
Automation Interface, Add-Ins and Tools / How to add a package
« on: September 18, 2008, 02:58:29 am »
hi,

i have a problem again. This time i'm trying to add a package to an existing package.
When i first try to add the package, i get an error message "automation error", in the second try i get the message again and EA crashes. I think it's just funny, that for all that the new package is in die Project Browser. So i think it works, but i don't like EA crashing all the time.

Any suggestions would be nice.

Code: [Select]
Sub AddPackage()

'the boring part
    Dim rep As EA.repository
    Dim pack As EA.package, subpack As EA.package
    Dim dia As EA.Diagram
    
    Set rep = GetObject(, "EA.App").repository
    Set pack = rep.GetPackageByID(50)
    
'the interesting part
    Set subpack = pack.Packages.AddNew("SubPack", "Nothing")
    If Not subpack.Update() Then 'this line causes the error
        MsgBox "error"
    Else
        pack.Packages.Refresh
    End If
    
End Sub

Update:
I just tested the code sample "Add and Manage Packages" and EA also crashes. Is it possible that it's not my fault?

6
Automation Interface, Add-Ins and Tools / Re: embedded elements in diagrams
« on: September 17, 2008, 02:05:22 am »
It was a very simple and well hidden mistake. I just set the variables to 0 somewhere in the deeps of my code.

But I'm still wondering why i have to move the ports to the components by myself and there is no way to let EA move them without moving the components.
Or is there any way?

7
Automation Interface, Add-Ins and Tools / Re: embedded elements in diagrams
« on: September 17, 2008, 01:44:56 am »
Sorry, it seems it was only a problem with the variables i use.
I think i can move ports now.

8
Automation Interface, Add-Ins and Tools / embedded elements in diagrams
« on: September 17, 2008, 01:02:04 am »
Hi,

I have a problem creating diagrams via automation.
When I add components and their ports to a diagram, i can change the components location and size, but not the ports location or size. The Ports allways shown in the upper left corner, far away from the components they belong to.
During my many tries to move the ports i found out, that the status bar in EA tells me the correct position, even if the ports shown somewhere else.

Until now I only figured out one way to make the ports go to where they belong to: When I move the components manually, the ports jumping to their places.

Any suggestions how to move the ports automated?

Pages: [1]