Skip to main content

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

Namespace: NextDesign.Desktop

Description

Adds the specified model units to the specified project.
If the specified unit is already loaded or is not managed by the specified project, it will be ignored.

If the target project is the current project, the busy indicator will be displayed and the method will be executed. However, it cannot be canceled.
Note that if the target project is unsaved, this method will fail to be called. If the target project is the current project, a message dialog will be displayed on the ND, just as if it was executed from the project navigator, and the additional loading will be aborted. If the project is not the current project, an exception will be raised.

Arguments

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

Return values

  • void

Exceptions

NameException classDescription
Invalid argumentExtensionArgumentExceptionWhen project is set to null
When unitFilePaths is set to null
UnsupportedExtensionNotSupportedExceptionWhen the current edition of the application is not supported
Invalid operationExtensionInvalidOperationExceptionWhen project is not the current project and project contains unsaved data

Annotation

If called during file-by-file difference comparison, there may be a discrepancy in the comparison results, so you must perform a re-comparison.