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.
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.
10-18-2012 07:48 AM
Good morning,
I have some data I needed to plot and would like to plot all of the curves with the same color. Normally I would just select each individual curve and set the parameters however there are over 12000 curves and the manual process would take an eternity.
Any ideas?
Solved! Go to Solution.
10-18-2012 04:27 PM
Hi,
which DIAdem version are you using ?
If you are using Diadem 2012, you can try this (it will paint all the curves of 2D diagrams of the active report sheet in turquoise):
Dim oMyReportObj, oMyReportObjects
Set oMyReportObjects = Report.ActiveSheet.Objects
For Each oMyReportObj in oMyReportObjects
If oMyReportObj.ObjectType = eReportObject2DAxisSystem Then
Dim curveNo
For curveNo = 1 To oMyReportObj.Curves2D.Count
oMyReportObj.Curves2D.Item(curveNo).Shape.Settings.Line.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise)
Next
End If
Next
Aurelie
10-19-2012 06:25 AM
Yes I have 2012
I ended up settling on this
Dim oMyCurves, oMyCurve View.Sheets(1).Areas(1).DisplayObjType = "CurveChart2D" Set oMyCurves = View.Sheets(1).Areas(1).DisplayObj.Curves For Each oMyCurve in oMyCurves oMyCurve.Color = "other colors" oMyCurve.ColorRGB = RGB(211,211,211) Next
However it takes a very very long time.
10-19-2012 05:37 PM
Hi Tim,
12000 curves is a really really BIG number of curves. There's probably a more efficient way of handling this. What if you concatenated all the data from all those 12000 X and Y channels into 1 pair of X and Y channels that are really really long? Then you'd just have 1 curve and it would display much faster. You could insert NoValues between the curve sections in the 1 pair of really really long X and Y channels to prevent ugly connecting lines between the sections on the graph.
Brad Turpin
DIadem Product Support Engineer
National Instruments
10-25-2012 06:17 AM
Hey Brad thanks for your response.
Inserting no values between each concatenated curve sounds interesting. For display purposes I needed to overlay these 10 - 15K curves over each other so I am not sure how I would do this utilizing your suggestion.
I was able to mine through the data and separate it by week (Which brought the total number of curves down to 4000) and used a simple function to find the average. This approach reduced the amount of curves to display.
However I did notice that when I tried to change the color of 14k curves via my script my I7 core CPU was only working at 25%. Is DIAdem limited on how much of my computers resources it uses?
Thanks
10-30-2012 05:04 PM
Hi Tim,
DIAdem 2012 and all previous versions operate on only one cpu core for analysis and graphing activities. How do you select all the channels to graph? Are you running a query in the DataFinder, or are you selecting hundreds of data files in the NAVIGATOR tree view, or are you using a multi-select file dialog in your VBScript, or what?
I can send you code to load all those values to a small set of channels with NoValue rows between the sets from different original data channels.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
11-02-2012 07:45 AM
Hey Brad,
I am selected the data by using the quick search function which allows me to filter out undesireable data. After I receive the results I select them all and load them all into the data portal. The load step seems to take a long time but I have encoutered performance issues even when loading larger .MDF files. By larger I mean 62 MB as opposed to the 11 MB files I normally open.
11-03-2012 08:05 PM
Hi Tim,
I can set you up with a context me menu in the NAVIGATOR search results that will load the search results and auutomatically concatenate all the channels of the same name from all those selected files/groups/channels. Do you have access to DIAdem 2012?
Do you really need to load all the channels from each file? If you only need a few channels from each file, it would be faster to query on the group or channel level and load only those channels that you really want.
Brad Turpin
DIAdem Product Support Engineer
National Instruments