DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

e2DShapeBars

I am trying to do something similar to the example shown in this link :

http://zone.ni.com/reference/en-XX/help/370858K-01/reportapi/properties/report_property_settings_ire...

 

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

0 Kudos
Message 1 of 8
(6,223 Views)

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

 

0 Kudos
Message 2 of 8
(6,218 Views)

Thanks Walter,

 

Yes, I am using Diadem2012.  Here is the subroutine I am using and the tdms file.

 

Regards,

 

Mostafa

0 Kudos
Message 3 of 8
(6,208 Views)

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

 

2013-03-06 15 49 22.png

 

Greetings

Walter

 

0 Kudos
Message 4 of 8
(6,199 Views)

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.

0 Kudos
Message 5 of 8
(6,196 Views)

If I use your provided data and change the index it works fine on my DIAdem 2012

 

Greetings

Walter

0 Kudos
Message 6 of 8
(6,192 Views)

Thanks, Walter. 

 

Time for some head scratching.

 

Mostafa

0 Kudos
Message 7 of 8
(6,190 Views)

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

0 Kudos
Message 8 of 8
(6,146 Views)