Click or drag to resize

InternalElementTypeHasRoleClassReference(RoleFamilyType, Boolean) Method

Determines whether this InternalElement object has an associated reference to the specified RoleClass. If inheritance relations between role classes should be regarded, the optional parameter 'regardInheritance' should be set. In this case the specified RoleClass is either identical to a referenced RoleClass or a referenced RoleClass is derived from the specified RoleClass.

Namespace: Aml.Engine.CAEX
Assembly: Aml.Engine (in Aml.Engine.dll) Version: 3.2
Syntax
public bool HasRoleClassReference(
	RoleFamilyType roleClass,
	bool regardInheritance = false
)

Parameters

roleClass  RoleFamilyType
The RoleClass object.
regardInheritance  Boolean  (Optional)
if set to true inheritance relations are regarded (default is false).

Return Value

Boolean
true if this InternalElement object has an associated reference to the specified RoleClass; otherwise, false.
Exceptions
ExceptionCondition
ArgumentNullExceptionroleClass
Example
This sample shows how to call the HasRoleClassReference(RoleFamilyType, Boolean) method using a standard base RoleClass from the RoleClassLib(CAEXDocument)
C#
var amlBaseRoleClassLib = AutomationMLBaseRoleClassLibType.RoleClassLib (myDocument);
InternalElementType internalElement;
...
internalElement.HasRoleClassReference (amlBaseRoleClassLib.AutomationMLBaseRole);
See Also