Skip to main content

IWorkspace.LoadModelUnits(IProject, IEnumerable <string>) method

Namespace: NextDesign.Desktop

Description

Adds the specified model unit in the specified project. Ignored if the specified unit has already been loaded or is not managed by the specified project.

If the target project is the current project, display the busy indicator and execute it. However, it cannot be canceled. If the target project has not been saved, the call to this method will fail. If the target project is the current project, a message dialog will be displayed on the ND as if it were executed from the project navigator, and the additional load will be interrupted. An exception will be raised if it is not the current project.

argument

NameTypeDescription
projectIProjectProject
unitFilePathsIEnumerable <string>Unit file path (absolute path)

Return value

  • void

Exception

NameException ClassDescription
Invalid argumentExtensionArgumentExceptionWhen null is specified for project
When null is specified for unitFilePaths
Illegal operationExtensionInvalidOperationExceptionWhen project is not the current project and there is unsaved data in project