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

Pages: [1]
1
Hi

I'm trying to create a DiagramObject with the API but for some reason it won't turn up in the Database and just won't save.
I tested it with the basic sample given on the Documentation (https://sparxsystems.com/enterprise_architect_user_guide/14.0/automation/the_addnew_function.html) but it still won't work. Any idea what I am doing wrong?

Edit: attached my code I tried:
diaObj = diagram.DiagramObjects.AddNew("l=200;r=400;t=200;b=600;", "")
    diaObj.Update()


and also
diagram.DiagramObjects.AddNew("l=200;r=400;t=200;b=600;", "")
 diagram.DiagramObjects.Update()

Cheers
Manuel

2
Bugs and Issues / Unique constraint violated
« on: March 08, 2022, 07:59:22 pm »
Hi

I got a problem that when I want to create a Class or Package or anything I get an error saying:

OraOLEDB [0x80040e2f]
ORA-00001: unique constraint (EAxxx.PK_OBJECT) violated


It doesn't matter if I try to do it via the EA UI or via the EA API.

I've read in a thread that an Oracle DB for EA is bad. While that may be true I just got into this ongoing project and we can't change that atm so it's not an option to switch to MSSQL or anything else.

regards,
FSXManu

3
Hi

I'm pretty new to this so sorry if this is a "duh, it's so easy" question :D
So I work with Python 3.8 and I get the COM Object of my repo and now I need to search for a specific package and see if a specific class already exists. If it exists I need to create an Image/png object which relates to that class.
If the class does not exist I need to create it and then attach the png/Image object.
My biggest problem is how can I create an Image with the AddNew method for the COM Object?

Could anyone help me?
Thx
Manuel

Pages: [1]