Write/Read |
About Cal Sets |
Description |
Add or change a name-value pair in the Cal Set, or read the value associated with a name. After editing, Save the CalSet to the PNA. About Name-Value pairsA Cal Set name-value pair is a general purpose data structure that maps a name to a value. This property allows you to associate a name with a value. Then, using this same property, you can read the value using the name. For example, one of the items added by the PNA firmware to every Cal Set is named 'Created By'. The value attached to this item is the name of the PNA App that created the Cal Set. When an SMC cal is performed, you can query the Cal Set for the 'Create By' item, and it will return 'Scalar Mixer/Converter'. The same query on an NFx channel returns 'Noise Figure Converters'. Warning - Do NOT change the name or value of any Items that you did NOT create. Otherwise, the PNA firmware may behave unpredictably. See Also |
VB Syntax |
CalSet.Item (name) = value |
Variable |
(Type) - Description |
CalSet |
(object) - A Cal Set object |
name |
(String) - Name of the name-value pair. |
value |
(Variant) - Can be an integer, float, double, string, or a single-dimensioned array of integer, float, double, string. |
Return Type |
Variant |
Default |
Not Applicable |
Example |
' Create the pna object Dim pna Set pna = CreateObject("AgilentPNA835x.Application") ' Get a handle to the calsets collection Dim calsets Set calsets = pna.GetCalManager.calsets ' Get a handle to the cal set to be edited Dim MyCalSet Set MyCalSet = calsets.Item("CalSet_1") ' Add a name-value pair(item) to MyCalSet MyCalSet.Item("MyItem")=15 ' Save the edited Cal Set to the PNA MyCalSet.Save ' Loop thru the name-value pairs in the Cal Set Dim CSetItems CSetItems = MyCalSet.EnumerateItems for i=lbound(CSetItems) to Ubound(CSetItems) ' List the item names in MyCalSet Dim name name = CSetItems(i) wscript.echo name ' List the value for each item name Dim value value = myCalSet.Item(name) wscript.echo value Next ' Delete the new name-value pair MyCalSet.RemoveItem("MyItem") |
C++ Syntax |
HRESULT get_Item( BSTR name, VARIANT *value); HRESULT put_Item( BSTR name, VARIANT value); |
Interface |
ICalSet6 |
Last Modified:
24-Sep-2010 |
MX New topic |