Skip to main content

IProjectService.LoadModelUnits(IProject,IEnumerable<IModelUnit>) Method

Namespace: NextDesign.Core.Runtime

Description

Adds and loads the specified model unit in the specified project.
If the specified unit is already loaded, this method is ignored.
Also, if the specified unit is not managed by the project, this method is ignored.

Note that calling this method will fail if the target project has not been saved.

Argument

NameTypeDescription
projectIProjectTarget project
unitsIEnumerable<IModelUnit>Target units

Return value

  • void

Exceptions

NameException classDescription
Invalid argumentExtensionArgumentExceptionIf project is specified as null
If units is specified as null
Invalid operationExtensionInvalidOperationExceptionIf the project has not been saved
If a closed project is specified as project
Not supportedExtensionNotSupportedExceptionIf the current edition of the application is not supported