From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

DIAdem Report having dynomic no.of channels

Hi All,

I have a Excel File which load as a Data Plugin. After Calculations, A new group is created and Channels are added. The number of channels are dynamic, means After first run, no. of channels are 12; Next Run No. of channels 15.

So, I have to plot these channels in report and every time the script runs, all the channels need to be in the report.

Is it possible. 

0 Kudos
Message 1 of 5
(2,846 Views)

Hi himanshu25,

 

If it's really just a question of 12 curves or 15 curves, then you can define a *.TDR layout file that has a graph with 15 curves, and it will likely work just fine for the 12 curve case.  To some extent the answer to your question depends on the channel names loaded into the Data Portal and whether these channels are all in the same channel group or spread over multiple channel groups.  It's possible we could use channel expansion to automatically plot N curves.  In all cases it would be possible to write a VBScript to programmatically add a curve for each loaded channel in the Data Portal.  If you can post a couple of these data files, I can give you more exact answers and perhaps even VBScript code.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 5
(2,808 Views)

Hi Brad,

I did the same thing plotted all the curves and in the Report Layout. But there are 150 curves and I am plotting sometimes 12 or 15 curves. The issue is, "Curve colors". Sometimes they are same or nearly same.

If it is possible to write a VB script to change the colors of the curve even we are using the *.TDR layout it would be great.

I can't share the data. Sorry!!!

0 Kudos
Message 3 of 5
(2,798 Views)

http://zone.ni.com/reference/en-XX/help/370858N-01/reportapi/objects/report_objects_irepcolorint/

This provides with good documentation on changing colors in DIAdem report programmatically.  Most objects and their colors are accessible in script (definitely 2DCurve).

Let me know if you need help applying it to a specific example.

Generally, I Right Click on an object in the report layout and select "copy as script".  Then I paste the result in the script tab and try to work with that by utilizing the autocomplete.

0 Kudos
Message 4 of 5
(2,791 Views)

Hi himanshu,

 

You can indeed change the curve colors of a REPORT graph with a VBScript, but there are only so many colors that the human eye can distinguish, and it's a number much less than 150.  You could come up with a sequence of 15 colors you like that are distinguishable and then repeat that list of colors as often as necessary, using a VBScript.  In DIAdem 2018 and later you can choose the colors to automatically repeat in the DIAdem Settings dialog.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 5 of 5
(2,784 Views)