GefObjects.AddClassObject (method)

Creates and returns a new class object in this container.
Syntax: Set GefObject = object.AddClassObject ( Project, ObjectID, GraphicName )
Project As String -
ObjectID As String -
GraphicName As String -
Description: The AddClassObject method creates and returns a new Class Object in this container.


Sub DuplicateClassObj()
  Dim cimScreen As GefObjectModel.GefScreen
  Set cimScreen = CimGetScreen()
  Dim cimClassObj As GefObjectModel.GefObject
  Dim cimClassObj2 As GefObjectModel.GefObject
  Set cimClassObj = cimScreen.Object.Objects.Item("TestClass")
  Set cimClassObj2 = cimScreen.Object.Objects.AddClassObject( _
          cimClassObj.ClassFormat.Project, _
          cimClassObj.ClassFormat.ObjectID, _
  cimClassObj2.Top = 1200
  cimClassObj2.Left = 100
  cimScreen.Refresh False
End Sub