DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

10.2 to 11.0

I have a command that works in 10.2 but not 11.0. If I change the command to work in  11.0 it no longer works in 10.2....

 

        dim index
        index = 10
        dim nizame
        'nizame = ChnPropValGet("[" & index &"]/Names"",""description")                                                            'This line works in 10.2 but not in 11.0
        'nizame = Data.Root.ChannelGroups(index).Channels("Names").Properties("description").Value           'This line works in 11.0 but not in 10.2.  

        msgbox nizame

 

Is there a command that will work in both versions and will continue to work in all  versions going forward.  I thought if I wrote scripts in older versions of Diadem they would play well with newer versions as well.  

 

I have attached the zipped TDMS and TDMS_Index files  

BBANACKI
0 Kudos
Message 1 of 3
(3,615 Views)

Hello bbanacki,

 

The script you posted has two typos in the code you created for DIAdem 10.2. If I run your code, I get a syntax error. If you replace it with this :

 

 nizame = ChnPropValGet("[" & index &"]/Names","description")

it will work. The second line cannot work in DIAdem 10.2 because it uses the API introduced with DIAdem 11. But the code you developed with 10.2 will continue to work in future versions of DIAdem.

 

Andreas

0 Kudos
Message 2 of 3
(3,612 Views)
Thank you for the quick response.  My script now works in both versions....  Lesson learned  :smileyvery-happy:
BBANACKI
0 Kudos
Message 3 of 3
(3,609 Views)