Skip to main content

IModel.FindRelatableModels Method

Namespace: NextDesign.Core

Description

Gets models that can be related to this model by the specified reference field.

If the base model of the search range is not specified, the entire project will be searched.

If the base model of the search range is specified, the model that can be related will be searched from the models under that model element.

In this case, the model obtained will not include the relationship. For fields that refer to relationships, call without specifying the base model of the search range.

If the specified field is not a reference field, an empty collection will be returned.

Arguments

NameTypeDescription
fieldNamestringName of the field to be associated
Null or an empty string cannot be specified.
scopeIModelModel that is the base point of the search range.
If not specified, the entire project will be searched.

The default value is null.

Return value

  • IModelCollection

Exceptions

NameException classDescription
Invalid argumentExtensionArgumentExceptionWhen null or an empty string is specified for fieldName
Field not foundExtensionFieldNotFoundExceptionWhen the specified field is not found in the metaclass of this instance