1
Automation Interface, Add-Ins and Tools / DiagramObjects.AddNew doesn't add a new diagramobject
« on: May 13, 2022, 05:30:35 pm »
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
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