Author |
Topic |
|
cab0008
25 Posts |
Posted - 06/08/2010 : 1:23:50 PM
|
Does anyone know what the origin C code is to change the scaling factor on a graph? I'm pretty new to programming, so I'm not that great, but I was hoping I could get just a couple functions that aren't as well known. The specific plot I want to change, as listed under the Plot details dialog box, is:
[GRAPHENEDATA]Sheet1!"Hex Intensities"(S),"value(2N+M)/2"(X),"vale-M"(Y)[1*.41*]
for the graph "Graphene_sheet".
So the best thing I could find in searching was something like this:
Graphene_sheet!layer1.factor = 42.
Although that's way off I'm sure. It may even be the wrong factor, and it only addresses the whole graph - not the specific plot.
Also, I wanted to know if you can export all of the worksheets as excel files. I know that it is possible to have the graphs exported as bmp images, so I thought it may be somewhat similar to this code. I made some small modifications to that code shown here:
foreach( PageBase pgb in Project.Pages ) { if( EXIST_WKS == pgb.GetType() ) { WorksheetPage wp(pgb); string strFormat = "XLS"; string fldr = "P:\Lab\Fluorescence data\Results\\" + Project.GetName(); CreateDirectory(fldr, NULL); string strImagePath = fldr + '\\' + Project.GetName() + '-' + wp.GetName() + ".XLS"; printf("File: %s\n", strImagePath); // Call function to export page with desired settings BOOL bRet = export_page_to_xls(strImagePath, strFormat, wp); // Report on error if( !bRet ) printf("Failed to export xls page: %s\n", pgb.GetName()); } }
I'm still missing something important because the export_page_to_xls() function is nonexistent. So my main question is if there exists anything that will perform that type of function.
Thank you for any help.
Origin Ver. and Service Release (Select Help-->About Origin): 8.0.63.988 SR6 Operating System: Windows XP |
|
cab0008
25 Posts |
Posted - 06/09/2010 : 11:58:19 AM
|
I figured out a way for changing the scaling factors but I still need a little help on the xls export. Here's the code if anyone else has a similar problem anytime.
GraphPage gp("Graph1"); Tree trFormat; trFormat = gp.GetFormat(FPB_ALL, FOB_ALL, TRUE, TRUE); trFormat.Root.Layers.Layer1.Curves.Curve2.Symbol.Scale.dVal = 42.; gp.ApplyFormat(trFormat, true, true); GraphPage gpg("Graph2"); Tree trForm; trForm = gpg.GetFormat(FPB_ALL, FOB_ALL, TRUE, TRUE); trForm.Root.Layers.Layer1.Curves.Curve2.Symbol.Scale.dVal = 42.; gpg.ApplyFormat(trForm, true, true);
|
|
|
Penn
China
644 Posts |
Posted - 06/09/2010 : 11:21:10 PM
|
Hi,
Currently, Origin can not export worksheet as excel file. We will consider to add this feature to the future version. Sorry for the inconvenience.
Penn |
|
|
|
Topic |
|
|
|