AddPen

<< Click to Display Table of Contents >>

 

AddPen

AddPen(PenName)

This method adds a new Pen to an E3Chart and returns that Pen. Please check the general Name property for more information about the allowed characters on the names of objects. Example:

Sub CommandButton1_Click()
  ' Creates an untitled Pen.
  Set Pen = Screen.Item("E3Chart1").Pens.AddPen("")
  MsgBox Pen.Name
End Sub
 
SubCommandButton1_DblClick()
  ' Creates a Pen named "Pen1".
  ' If this name already exists, increments it.
  Set Pen = Screen.Item("E3Chart1").Pens.AddPen("Pen1")
  MsgBox Pen.Name
End Sub
 
Sub CommandButton2_Click()
  ' Creates a Pen and links it to DemoTag1.
  Set Chart = Screen.Item("E3Chart1")
  Set Pen = Chart.Pens.AddPen("")
  MsgBox Pen.Name
  Pen.UsetimeStamp = True
  Pen.YLink = "Data.DemoTag1"
  Pen.Connect()
End Sub

Was this page useful?