Chapter 9 Accessing objects using VBScript


Creating an object

It is recommended to create an object directly from the collection to which it belongs in order to directly obtain a valid state for the object. When you do so, you only create the object but not its graphical symbol.

Example

set entity1 = ActiveModel.entities.createnew

You can also use the following method: CreateObject(ByVal Kind As Long, ByVal ParentCol As String = "", ByVal Pos As Long = -1, ByVal Init As Boolean = -1) As BaseObject

Example

set class1 = ActivePackage.CreateObject (cls_Class)

 


Copyright (C) 2005. Sybase Inc. All rights reserved.