SetCaption method (TrendPro object)
Sets the caption of a trace and shows the caption in the legend.
Syntax
TrendPro1
.SetCaption
(caption
, tagName
, [modelName
], [traceType
])where
TrendPro1
- is the name of a TrendPro object or an expression that evaluates to a TrendPro object.caption
- is a parameter of String that will display in the y-axis of the trend and in the Tag
field of the Tag list. You can also use extended tag property or tag value for the caption.tagName
- is a parameter of String that specifies the trace name.modelName
- is an optional parameter of String that specifies the historical model
name. The parameter is required if the traceType
is TraceTypeAF
,
TraceTypeDataLog
, TraceTypeHistorian
or TraceTypePIServer
. traceType
- is an optional parameter of the TrendTraceType
constant. The parameter can be omitted if the trace type is live data or data log.Example
Private Sub SetTrendProCaption() 'Sets the caption for tag {/Line1_DataServer::[CookieLine]Program:Mixer.Temperature} from the data log Mixer. TrendPro1.SetCaption "Temperature", "{/Line1_DataServer::[CookieLine]Program:Mixer.Temperature}", "Mixer" End Sub
Provide Feedback