T O P I C R E V I E W |
srosekra |
Posted - 09/08/2005 : 10:40:55 AM -I have a loop that is waiting for someone to hit the TBUTN that I created, so how would I get values back from the gui controls? -but I am creating the graph based on a template and would like to find out how it is done in both c and labtalk -My code... GraphPage gp; GraphLayer gl; GraphObject go; gp.Create("DataFit.otp", CREATE_VISIBLE_SAME) ) //the datafit has one cntrl which is a TBUTN named DFit string wkstname = "junkd10"; Command.Format("layer -w %s", wkstname); //puts graph on window LT_execute( Command ); gl = (GraphLayer) gp.Layers(0); go = gl.GraphObjects("DFit"); //also tried go = g1.GraphObjects("DFit.v1") -can't seem to get cntrl's value. I was using the TBUTN as a check button so when clicked, DFit.v1= (in script window) changed from 0 to one. Would like to use this value to break out of the loop after the user has manipulated the graph to their liking.
-Thanks Sean
Origin Version (Select Help-->About Origin): Operating System: |
3 L A T E S T R E P L I E S (Newest First) |
srosekra |
Posted - 09/09/2005 : 6:53:58 PM THAT WORKED GREAT!
Thanks |
Mike Buess |
Posted - 09/08/2005 : 2:11:17 PM UIM documentation is only in the OriginPro (hardcopy) Manual and there is little direct access to UIM properties from Origin C. Unless you are sure that DFit will be in the active layer this is probably the best way to get at its properties...
GraphPage gp("Graph1"); GraphLayer gl = gp.Layers(0); GraphObject go = gl.GraphObjects("DFit"); if( go ) // you can test for its existence { double dVal; gl.LT_execute("v1=DFit.v1"); LT_get_var("v1",&dVal); out_int("DFit.v1=",(int) dVal); } else out_str("DFit does not exist.");
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 09/08/2005 2:15:48 PM |
srosekra |
Posted - 09/08/2005 : 10:47:23 AM Where do you find the methods for these objects? I can't find them in the help files. |