T O P I C R E V I E W |
ovelha.negra |
Posted - 07/31/2009 : 04:51:30 AM Origin Ver. and Service Release (Select Help-->About Origin): Operating System:
Hi,
I have a small program to index automatically some lines in several graphs and I have associated that same program to a button. It was written using origin 7 and i want to make it work in origin 8. Could someone please tell me if there is any changes refering to the code that I must take into consideration? I have checked everything several times and I have no idea of what's wrong.
#include <Origin.h>
#include <Graph.h>
void Plot_Data(string strTemplate, string strData)
{ GraphPage grph; BOOL bOK = grph.Create(strTemplate, CREATE_VISIBLE);// this create a graph window from a Template if (!bOK) return;
GraphLayer grlay = grph.Layers(0); // attaching the first layer (0) to a new GraphLayer object Curve cv(strData); //adding the Curve object to the GraphLayer1 object int nPlot = grlay.AddPlot(cv); if(nPlot>=0)
{ // setting plot color to blue (3) grlay.DataPlots(nPlot).SetColor(3, TRUE); grlay.Rescale(); // rescaling the plot }
//--------------
string LTcmd; // assign string variable LabTalk statements LTcmd = "label -xb (Energy (eV));" "label -yb (Luminescence intensity (arb.units));" "draw -c 1 -l {3.33329,1000,3.33329,20000};" "draw -d 2 -n myText -l {3.363443,1000,3.363443,20000};" "draw -d 2 -l {3.3605,1000,3.3605,20000};" "draw -d 2 -l {3.357269,1000,3.357269,20000};" "draw -d 2 -l {3.3484,1000,3.3484,20000};" "draw -d 2 -l {3.36141112,1000,3.36141112,20000};" "draw -d 2 -l {3.3772,1000,3.3772,20000};" "draw -d 2 -l {3.3759,1000,3.3759,20000};" "draw -d 2 -l {3.3156,1000,3.3156,20000};" "draw -d 2 -l {3.3069,1000,3.3069,20000};" "label -a 3.33329 21000 DBX;" "label -a 3.363443 21000 I4;" "label -a 3.3605 21000 I8;" "label -a 3.357269 21000 I9;" "label -a 3.3484 21000 I11;" "label -a 3.36141112 21000 I6;" "label -a 3.3772 21000 AL*;" "label -a 3.3756 21000 AT*;" "label -a 3.3140 21000 TES1;" "label -a 3.3050 21000 TES2;"; LT_execute(LTcmd); //--------------
}
void plott(string strTemplate) { string data = "DefaultDd"; string wsname;
for( int i = 1; i < 26; i++ ) { wsname = data + i + "_b"; Worksheet wks(wsname); string LTcmd; LTcmd = "DefaultDd" + i + "_signal1" "= (6.62606896E-34*0.62415E28*299792458)/DefaultDd" + i + "_signal1"; LT_execute(LTcmd); Plot_Data( strTemplate, wsname) }
} |
1 L A T E S T R E P L I E S (Newest First) |
Iris_Bai |
Posted - 07/31/2009 : 05:18:03 AM Hi,
Could you give more details about not work in Origin8?
Iris |
|
|