03-05-2013 02:16 PM
I am trying to do something similar to the example shown in this link :
Diadem does not like this line of code oMyShape.XChannel.Reference = "" , it complains that it can not set the property (property can not be set). However, the next line oMyShape.YChannel.Reference = "[3]/[1]" works fine.
I have one channel group with just one channel which has 4 readings that I would like to display as a bar graph. If I comment the offending line out I don't see the chart, if I leave it, I get the above-mentioned error.
Mostafa
03-06-2013 12:54 AM
Hi MostafaK,
I can not reproduce the problem that you're describing. The object oriented API is supported since DIAdem 2012 - so I assume, you work with this version. I copied the example you mentioned in your post and tested it without problem. Please can you send me your script and dataset so that I can test the behavior with your data?
Greetings
Walter
03-06-2013 06:45 AM
Thanks Walter,
Yes, I am using Diadem2012. Here is the subroutine I am using and the tdms file.
Regards,
Mostafa
03-06-2013 08:50 AM
Hi Mostafa,
You are refering to a non existing channel group:
oMyShape.YChannel.Reference = "[3]/[1]"
correct is
oMyShape.YChannel.Reference = "[1]/[1]"
Please have a look to the help of the channel reference for more details
Greetings
Walter
03-06-2013 08:55 AM
I have 2 other channel groups. This one is the 3rd one in the channel groups. I did not provide the other 2 because they were irrelevant. Forgot to mention this in my previous e-mail.
03-06-2013 09:10 AM
If I use your provided data and change the index it works fine on my DIAdem 2012
Greetings
Walter
03-06-2013 09:14 AM
Thanks, Walter.
Time for some head scratching.
Mostafa
03-12-2013 06:25 PM
Hi All,
Mostafa and I are pusuing this in regular email, but for all of you interested 3rd parties out there, the thing that fixed his code on my end was adding the command:
Call Report.Settings.ConvertToChannelReferenceByName
This forces the REPORT layout to reference channels by name, not global number,
Brad Turpin
DIAdem Product Support Engineer
National Instruments