PC-Dmis 2010 MR2 Object Library | Send comments on this topic. | See Object Hierarchy Chart
Add Method
See Also

Collapse All Expand All

ObjectType
  This can be an a constant value or an enumerated value.

Left
  This Long value sets the location of the left side of the control from the left side of the editor.

Top
  This Long value sets the top location of the control from the top side of the editor.

Right
  This Long value sets the right location of the control from the left side of the editor.

Bottom
  This Long value sets the bottom location of the control from the top side of the editor.

# Description

Adds a new control to the label template The Add function creates a new Label template in PC-DMIS.

# Syntax

Visual Basic

    Public Function Add( _
       ByVal ObjectType As ENUM_REPORT_TEMPLATE_OBJECTS, _
       ByVal Left As Long, _
       ByVal Top As Long, _
       ByVal Right As Long, _
       ByVal Bottom As Long _
    ) As Object

# Parameters

ObjectType

  Value | Description
  --- | ---
  ID_HOB_TEXT |
  ID_HOB_TEXT_RT |
  ID_HOB_LINE |
  ID_HOB_POLYLINE |
  ID_HOB_BORDER |
  ID_HOB_ARC |
  ID_HOB_CIRCLE |
  ID_HOB_BITMAP |
  ID_HOB_PTR |
  ID_HOB_GAUGE |
  ID_HOB_GRAPH |
  ID_HOB_PCD_TEXT_REPORT_OBJECT |
  ID_HOB_PCD_CAD_REPORT_OBJECT |
  ID_HOB_PCD_COMMAND_TEXT_OB |
  ID_HOB_PCD_GRID_CTRL_OB |
  ID_HOB_PCD_LEADERLINE_OB |
  ID_HOB_PCD_DIMCOLOR_OB |
  ID_HOB_PCD_ANALWIN_OB |
  ID_HOB_CADIMAGEOBJECT_OB |
  ID_HOB_PCD_SPC_CHART_OB |
  ID_HOB_PCD_LABEL_OB |

  This can be an a constant value or an enumerated value.
Left
  This Long value sets the location of the left side of the control from the left side of the editor.
Top
  This Long value sets the top location of the control from the top side of the editor.
Right
  This Long value sets the right location of the control from the left side of the editor.
Bottom
  This Long value sets the bottom location of the control from the top side of the editor.

# Remarks

The Add method inserts a new control of a defined location and size into the current label template. To find out what properties are available to a control, in PC-DMIS's Label Template editor, insert the control and then access its properties sheet.

# Example

Private Sub Add_Arc()

Set ArcControl = LabelObjects.Add(ID_HOB_ARC, 10, 10, 200, 200)

ArcControl.Bottom = 100

ArcControl.Left = 10

ArcControl.LineStyle = 2

ArcControl.LineWidth = 1

ArcControl.Right = 790

ArcControl.Top = 20

ArcControl.Visible = False

End Sub

# See Also

LabelControls Object

© Wilcox Associates, Inc. All Rights Reserved.

© 2010 All Rights Reserved.