Vous créez un objet lien à l'aide de la méthode CreateNew(kind As Long = 0) As BaseObject, puis vous devez déclarer ses extrémités.
Dim MyRealization
If (not ExistingModel Is Nothing) and (not FoundClass Is Nothing) and (not IntfShct is Nothing) Then
' We are now going to create a realization link between the class and the interface
' The link is an object like others with two mandatory attributes: Object1 and Object2
' For oriented links, Object1 is the source and Object2 is the destination
Set MyRealization = ExistingModel.Realizations.CreateNew()
If not MyRealization is Nothing then
output "The realization link has been successfully created"
' Initialize both extremities
Set MyRealization.Object1 = FoundClass
Set MyRealization.Object2 = IntfShct
' Initialize Name and Code
MyRealization.SetNameAndCode "Realize Main interface", "Main"
End If
End If