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 » Tue Jan 29, 2019 4:14 am


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);
    ProjectDescriptor descriptor = ProjectDescriptorsFactory.createLocalProjectDescriptor(project, new File(directory + "/" + projectName, projectName + ".xml"));
    projectsManager.saveProject(descriptor, true);

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 0 guests