Creates a new pen and adds it to this collection.
Defined As
Parameters
penType
[in]
Indicates the
type of pen that will be created. See PenType Enumeration for the
types of pen that can be created.
penNameMode
[in]
Indicates how
the name will be obtained for this pen. The Process Analyst
provides options of PenNameMode_Comment, PenNameMode_Tag, and
PenNameMode_Custom. Specifying PenNameMode_Comment will mean that
the Process Analyst names the pen from the Comment field of the
trend/alarm tag associated with the IPen.DataPoint property.
Specifying PenNameMode_Tag will mean that the Process Analyst will
name the pen as the value of the IPen.DataPoint property.
Specifying PenNameMode_Custom causes the Process Analyst to provide
a default name and leave setting the name to you via the IPen.Name
property.
Execution Results
If the method succeeds the return value will be Success. If the pens collection is deleted, the return value will be GeneralFailure.
Remarks
If this method succeeds, a new Pen of the specified type is created and appended to the pens collection.
See Also
IPen Interface, PenType [Enumeration], PenNameMode [Enumeration]
Calling Syntax
This example assumes there is a valid Pens collection object to be passed in to the example methods.
[VBA]
Sub Example(pens As Object)
Dim pen As Object
Set pen = pens.Create(4097, 1)
End Sub
[Cicode]
FUNCTION Example(OBJECT hPens)
OBJECT hPen = _ObjectCallMethod(hPens, "Create" , 4097, 1);
END