Skip to main content

IProject.AddNewRootModel method

Namespace: NextDesign.Core

Description

Adds a new model of the specified class to the project.
Even if the specified class is an abstract class, instantiation is allowed and it will be added as an element at the end of the corresponding field.
The added model is retained as an element under the project node (immediately under the project) displayed on the model navigator.
Note that if there are multiple matching classes when performing a fuzzy match, the instance of the first type-compatible class that is found is added.
Also, it can be added even if "Can be placed directly under the project?" of the specified class is not checked.

argument

NameTypeDescription
classNamestringClass Name
Specify the name or fully qualified name of the class.
Null or empty string cannot be specified.
Whether to treat thefuzzybool

Return value

Exceptions

NameException ClassDescription
Invalid argumentExtensionArgumentExceptionIf null or an empty string is specified for className
Class not foundExtensionTypeNotFoundExceptionIf the specified class is not found