68520024
MD2021x
3
Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
The com.nomagic.magicdraw.core.project.ProjectsManager class is responsible for containment and management of projects.
Use the code below to access ProjectsManager
Code Block | ||
---|---|---|
| ||
ProjectsManager projectsManager = Application.getInstance().getProjectsManager(); |
ProjectsManager provides the API for com.nomagic.magicdraw.core.Project creating, closing, saving, loading, and activating. A program can have multiple opened projects, but only one project can be active.
Code Block | ||
---|---|---|
| ||
//Gets all the projects List<Project> projects = projectsManager.getProjects(); //Gets an active project Project activeProject = projectsManager.getActiveProject(); |
An active project can also be accessed directly from com.nomagic.magicdraw.core.Application:
Code Block | ||
---|---|---|
| ||
//Gets an active project Project project = Application.getInstance().getProject(); |
Info |
---|
You can find the code examples in <programinstallation direc tory><installation_directory>\openapi\examples\projects |
Panel | ||||
---|---|---|---|---|
| ||||
|