DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with DataBlClpPaste

    I am having problems with DataBlClpPaste in Diadem 10.1. I used the exact snippet of code in Diadem 9.1 and it worked perfectly but now that I am working in 10.1, it is not working. Note that I am using the exact script file in both versions.

Call DataBlClpPaste(r1 &"-"& r2, r24, Number_Of_Runs)

where

r1 = ChnPropGet("End_Time", "groupindex")
r2=r22-r21 + 1
r21 = ChnPropGet("End_Time", "groupindex")
r22 = ChnPropGet("Data_File_Name", "groupindex")

Any help I can get will be greatly appreciated....


0 Kudos
Message 1 of 4
(3,533 Views)

Hello tavbovbo,

Thank you for posting on the Ni Discussion Forums.  I tried the same function out on version 10.2 of DIAdem, and experienced problems as well.  It seems as though DataBlClpPaste() is only pasting data to the first channel in the ChnNoStr input parameter.  This was reported to R&D (#117928) for further investigation.  One way you could work around this problem is to call DataBlClpPaste() in your code once for each channel that you are writing the data to, which would look something like this:

do while r1 <= r2

     Call DataBlClpPaste(r1, r24, Number_Of_Runs)
     r1 = r1 + 1

loop

Thanks for the feedback!

Chris_G
Sr Test Engineer
Medtronic, Inc.
0 Kudos
Message 2 of 4
(3,516 Views)

Hi There,

It looks to me like you're not setting the parameters of the function correctly.  What is the value of r24?  Do you want the selected values to be inserted at the top of the target channels?  If so, then you should set the start row parameter to 1, not a variable.  Most importantly, it does not look like your channel string (first parameter) is correct.  If you reference a series of source channels in different groups, then you need to list them explicitly with the "," delimiter, not the "-" delimiter.  Or even better, use the ChnStrAdd() function ahead of time to construct the correct channel string.

I can't answer more thoroughly because I'm on vacation right now,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 3 of 4
(3,497 Views)

Hello All,

Regarding the CAR mentioned in my previous post:

This was reported to R&D (# CAR ID), but was determined to be expected behavior because DataBlClpPaste() pastes data to multiple channels only if the data it is copying from the clipboard has multiple columns.  In other words, if you are going to use one DataBlClpPaste() call to paste data into multiple channels, then the data being pasted must be 2-dimensional.

I hope that this clears up any confusion.

Chris_G
Sr Test Engineer
Medtronic, Inc.
0 Kudos
Message 4 of 4
(3,465 Views)