Query 1 - When I create the model elements ( Application Components ) in a ArchiMate diagram using the Open API, I want the components to have the ids that Open API code supplies rather than auto generated ids. Is there any setting where I can specify the id is to be picked up from one supplied via Open API code and only if the one supplied is null or blank then VP to auto generate it.
IArchiMateApplicationComponent appComponent = IModelElementFactory.instance().createArchiMateApplicationComponent();
appComponent.setUserID("123456789")
appComponent.setName("Some Name")
appComponent.setDescription("Some Description")
IArchiMateApplicationComponentUIModel shapeArchiComponent = (IArchiMateApplicationComponentUIModel) diagramManager.createDiagramElement(archiMate, appComponent);
shapeArchiComponent.setSize(200, 80);
shapeArchiComponent.resetCaption();
archiMateDiagram.addDiagramElement( shapeArchiComponent );
My ids are getting picked up sometimes ( when I start with a complete new project for example ) and sometimes its giving them auto generated ids. I am adding the components in a local project, so there are no duplicates here right now.
Query 2 - Another query is how do I pick up the logged in VP user name via Open API
Query 3 - How do I programmatically give a Organic Layout to the diagram via Open API
Many thanks for the help.