Previous Topic: MethodsNext Topic: CountCardManyAsc


AddAssoc

This method creates an association between the current object and a given object.  The parameters are the association type code and the destination object id.

Syntax

object.AddAssoc nAscTypeCode nDestObjID

Parameters

object

An expression that evaluates to a MetaModelObject.

nAscTypeCode

 A long value indicating the type of association to add.

nDestObjID

A long value indicating the object id of the destination object.

Remarks

EAPI_SUCCESSFUL_RC - indicates a successful execution

EAPI_ATC_INVALID_RC - if association type code is invalid

EAPI_FROM_OBJECT_NOT_FOUND_RC - indicates that the current object is invalid

EAPI_TO_OBJECT_NOT_FOUND_RC - indicates that the destination object is invalid

EAPI_ASSOC_NOT_FOUND_RC - indicates that the association is not valid between the two objects

EAPI_ASSOC_ALREADY_EXISTS_RC - indicates that the association being added already exists

EAPI_ASSOC_PROTECTED_RC - indicates that adding this association would cause a protection error