Chapter 3 Getting Started with Objects Manipulation Using Scripts
You create a link object using the CreateNew(kind As Long = 0) As BaseObject method, then you have to declare its ends.
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
| Copyright (C) 2007. Sybase Inc. All rights reserved. |
| |