DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Accssesing Channel Properties through VBscript

Hi everybody

How can I access the channels properties  in a vbscript script?

for example  in the data portal I have loaded the group "example"  with the following channels :time ,speed , revolutions
what it is the best way to do get  the property "original path file" for the time channel and the property  "Original File"  for the same channel

thanks in advance

0 Kudos
Message 1 of 2
(3,246 Views)

Hi arkangel,

The simplest approach is to consistently use the commands "RootPropGet()", "GroupPropGet()", and "ChannelPropGet()", and the easiest way to discover the correct parameters to use is the following:

1) Switch to the SCRIPT panel
2) Left-click once on the Root/Group/Channel in the Portal you wish to read a property from
2) Left-click once on the particular property name in the Portal you wish to read
3) Drag and drop that property name into SCRIPT
4) You will get 2 code snippets, a read snippet and a write snippet
5) Note that the read snippet is a function which will always return a string value

PropVal1 = ChnPropGet("[1]/[1]", "sourcedatafilename")
PropVal2 = ChnPropGet("[1]/[1]", "sourcedatafilepath")

Ask if you have further questions,
Brad

 

0 Kudos
Message 2 of 2
(3,237 Views)