Skip to main content

IModel.FindOwnerByClass(IPackage,string,bool) Method

Namespace: NextDesign.Core

Description

Gets the first owner instance of the specified class that holds this instance.
The specified class is identified from the package specified in the scope.

Traces the instances that own this instance toward the parent and returns the first instance of the specified class found.
If no matching instance is found even after searching up to the top-level parent element, null is returned.

Note that null is returned if the class specified in the class name is not found.
In addition, when a fuzzy match is performed and there are multiple matching classes, the first instance of the class found is returned.

Arguments

NameTypeDescription
scopeIPackageScope (Package that is the base point of the search range)
classNamestringClass name
Specify the name or fully qualified name of the class.
If null or an empty string is specified, the return value of this method will be null.
fuzzyboolFuzzy match option
Whether to treat the className argument as the name of the class instead of the fully qualified name.
If False, it will be evaluated as specifying a class whose fully qualified name matches className.
If True, it will be evaluated as specifying a class whose class name matches className.

The default value is True.

Return value