Skip to main content

IWorkspace Interface

Namespace: NextDesign.Desktop

Description

Provides a means to access the application's workspace information.

Area

NameDescription
Workspace/ProjectA set of APIs to access the application's workspace and the project currently open in the application.

Property

NameDescription
CurrentEditorInformation about the editor currently displayed in the selected editor view.
Returns null if no editor is displayed.
CurrentModelSelected model element in the current project.
Returns null if no model is selected.
CurrentProductThe product currently applied in the current project.
CurrentProjectCurrent project
Returns the project information currently open in the application's workspace.
Returns null if no project is open in the application.
ErrorsError list
This object can be used to access currently registered error information.
InfoDisplayStyleSetStyle set definition
This object can be used to manage the styles that can be specified when displaying errors and search results.
MainEditorEditor information currently displayed in the main editor view
Returns null if no editor is displayed.
OutputOutput
This object can be used to access the application's output.
ProjectAutoReloadGets or sets whether to automatically reload the project when changes are made to the project from outside Next Design. A confirmation dialog will be displayed if the project is to be automatically reloaded. Specify true to reload the project, or false to not reload it.
ScmConfiguration management access object
SearchSearch
This object can be used to access a list of search results.
StateWorkspace state
SubEditorEditor information displayed in the current sub-editor view
Returns null if no editor is displayed.

Method

NameDescription
CanRedoChecks if an undone edit operation can be redone.
CanUndoChecks if an edit operation can be undone.
CleanUpProjectCleans up the specified project.
If no project is specified, the currently open project in the application is cleaned up.

Project cleanup is performed only on units of the specified project that meet the following conditions:
・Editable (not readonly)
・Not referenced
・Loaded
Note that if the target project is not saved, this method call will fail.
CloseCurrentProjectCloses the current project.
CloseDiffEnds the difference comparison.
CloseProjectCloses the specified project.
If no project is specified, it closes the current project currently open in the application.

If the specified project is not the current project currently open in the application, it discards the changes and closes the project without warning, even if the project is not saved.
CreateSearch[Obsolete] Creates a search object.
This object can be used to start and end searches and register search results.
GenerateDocumentGenerates a document.
The selected element in the Model Navigator will be used as the base model for output.
GetModelUnitByLoadModeRetrieves the model unit that is set to the specified load mode.
LoadModelUnits(IProject,IEnumerable<IModelUnit>)Adds the specified model unit in the specified project.
If the specified unit has already been loaded or is not managed by the specified project, it will be ignored.

If the target project is the current project, a busy indicator will be displayed and execution will proceed. However, it cannot be canceled.
Note that if the target project is not saved, calling this method will fail. If the target project is the current project, a message dialog will be displayed on the ND as when executed from the Project Navigator, and the additional loading will be interrupted. An exception will be raised if it is not the current project.
LoadModelUnits(IProject,IEnumerable<string>)Loads the specified model units into the specified project.
If the specified units are already loaded or are not managed by the specified project, this method is ignored.

If the target project is the current project, a busy indicator is displayed and execution is performed. However, it cannot be canceled.
Note that if the target project is not saved, this method call will fail. If the target project is the current project, a message dialog will be displayed on the ND as if executed from the Project Navigator, and the additional loading will be interrupted. An exception will be raised if it is not the current project.
NewProjectCreates a new project.
OpenDiffDisplays a difference comparison from the specified difference comparison information.
OpenProject(string,bool,bool)Opens the specified project.

OpenProject(string,OpenProjectOptions)Opens the project with the specified options applied.
RedoRe-executes the undone editing operation.
ReloadProjectReloads the specified project.
If no project is specified, it reloads the currently open project in the application.
SaveAllResaves the file based on the latest state.
If no project is specified, the current project is saved.

An exception is thrown if no files have been created for the specified project.
Units that are not loaded and units that are read-only are not saved.
SaveProjectSaves the specified project.
If no project is specified, the currently open project in the application is saved.
Returns True if saved successfully.
If this method is used in situations such as not being able to obtain file access rights or not having enough free space, the project will not be saved and this method will return False.

The save location for the project is the path obtained by IProject.Path.
Therefore, this method cannot be executed on a project that has not been saved since its creation.
When saving a new project, please use SaveProjectAs().
SaveProjectAsSaves the specified project at the specified path.
If no project is specified, this saves the currently open project in the application.
Returns True if the save was successful.

This call overwrites the file without warning if a file already exists at the specified path.
If the save is successful, the Path of the target project is replaced with the new path.
SetLoadModeSets the load mode of the model unit.
Ignored if the specified unit is not managed by the specified project.
UndoUndoes the edit operation.