05-10-2017 08:01 AM
Does anyone know of a way to change the default channel colors (and other properties like line width) in the View panel?
i.e. 1st channel is red, 2nd channel is green, etc.
I do a lot of screen shots from the view panel and the default colors are not always best for viewing.
Thanks
Solved! Go to Solution.
05-10-2017 08:10 AM
You can change it during runtime by right clicking on the legend or via property nodes
http://zone.ni.com/reference/en-XX/help/371361N-01/lvconcepts/customizing_graphs_and_charts/
See Color—Displays the color picker so you can select the color of the plot.
05-10-2017 08:12 AM
Yes, thank you....but I want to change the default settings.
05-10-2017 08:16 AM
Is this code or an exe?
Do you want the colors to be changed during runtime?
Do you want to store the last set colors to a file so that on the next run those are the colors?
05-10-2017 08:47 AM
I want to open diadem, load a .tdm, drag channels into the view pane with specific default colors - ch. 2 want blue instead of green, for example.
05-10-2017 08:53 AM
I apologize, the above info I posted is incorrect.
Any luck modifying the TDV file?
05-10-2017 09:05 AM
In general you can modify the default settings for the color in any dialog box. But you could create a script that creates you layout or you define a "OnDrop" event.
For the ondrop event you find information in the DIAdem help: http://zone.ni.com/reference/en-XX/help/370858M-01/scriptview/properties/view_property_ondrop_itoeve...
If you want to create the layout by script the best starting point is to press Ctrl+Shift+C in the dialog box of the curves. Then open DIAdem SCRIPT and paste the code that was generated.
Hope that helps
Winfried
05-10-2017 09:22 AM
There was an idea exchange post about default VIEW configuration some time ago.
Looks like this has not been implemented yet, so feel free to give Kudos for that 😉
05-10-2017 09:41 AM - edited 05-10-2017 09:46 AM
As a workaround you can define your colors in DIAem: Settings --> DIAdem Settings --> Colors
Then use this example script to assign these colors in the same order to all 2D axis system curves in the current view sheet:
dim i,oArea for each oArea in View.ActiveSheet.Areas if StrComp(oArea.DisplayObjType, "CurveChart2D") = 0 then for i=1 to oArea.DisplayObj.Curves2D.Count oArea.DisplayObj.Curves2D(i).Color = "other colors" oArea.DisplayObj.Curves2D(i).ColorRGB = UserDefColors(((i-1) mod 16)+1) next end if next call view.Refresh()
05-10-2017 11:20 AM
Thank you Christian...this works perfectly.