IWorkspace.LoadModelUnits(IProject,IEnumerable<IModelUnit>) 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
Name | Type | Description |
---|---|---|
project | IProject | Project |
units | IEnumerable<IModelUnit> | Model unit |
Return value
- void
Exceptions
Name | Exception class | Description |
---|---|---|
Invalid argument | ExtensionArgumentException | When null is specified for project When null is specified for units |
Invalid operation | ExtensionInvalidOperationException | When project is not the current project and project contains unsaved data |
Unsupported | ExtensionNotSupportedException | When the current edition of the application is not compatible |
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.