Skip to main content

IProject.AddNewRootModel method

Namespace: NextDesign.Core

Description

Adds a new model for the class specified in the project. Even if the specified class is an abstract class, it allows instantiation and is added as the last element of the corresponding field. The added model is retained as an element under the project node (directly under the project) displayed on the model navigator. If there are multiple matching classes when making an ambiguous match, add the instance of the type-compatible class found first. Also, you can add it even if "Can it be placed directly under the project" of the specified class is not checked.

argument

NameTypeDescription
classNamestringclass name
Specify the name of the class or the fully qualified name.
Null or an empty string cannot be specified.
fuzzyboolclassName Whether to treat the argument as a class name rather than a fully qualified name.
If False, evaluate as specifying a class whose fully qualified name matches className.
If True, evaluate as specifying a class whose class name matches className.

The default value is True.

Return value

Exception

NameException ClassDescription
Invalid argumentExtensionArgumentExceptionWhen null or empty string is specified for className
Class not foundExtensionTypeNotFoundExceptionIf the specified class cannot be found