Page 1 of 1

UML 2.5 XMI (openAPI) Excluding dependent projects

PostPosted: Tue Jan 29, 2019 4:14 am
by haider-ahmed@live.co.uk
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.