UML 2.5 XMI (openAPI) Excluding dependent projects

MagicDraw OpenAPI, scripting related questions and discussions

Moderator: Moderators

UML 2.5 XMI (openAPI) Excluding dependent projects

Postby haider-ahmed@live.co.uk » Tue Jan 29, 2019 4:14 am

Hello,

I am trying to run a function which, given a ProjectDescriptor will return xml (UML 2.5) but just for that relevant project, ignoring its dependencies which are also Magic Draw projects. Is there anyway to include this filter using what I have below?

Code: Select all
public void ExportProjectToUML(String directory, ProjectDescriptor projectDescriptor, ProjectsManager projectsManager) {
    projectsManager.loadProject(projectDescriptor, true);
    String projectName = projectDescriptor.getRepresentationString();;
    Project project = Application.getInstance().getProject();
    if (project == null) {
        System.out.println("Couldn't find project " + projectName);
        return;
    }
    ProjectDescriptor descriptor = ProjectDescriptorsFactory.createLocalProjectDescriptor(project, new File(directory + "/" + projectName, projectName + ".xml"));
    projectsManager.saveProject(descriptor, true);
    projectsManager.closeProject();
}


Regards,
Haider.
haider-ahmed@live.co.uk
Forum Newbie
Forum Newbie
 
Posts: 4
Posts Rating:2
Joined: Wed Nov 07, 2018 9:22 am

Return to Programmatic Extendibility

Who is online

Users browsing this forum: No registered users and 3 guests