The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Spreadsheet Cell Data Entry Using Labscript

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Saziku Posted - 08/12/2013 : 3:40:22 PM
Hi again,

Time and time again, I get stuck, and I always find this forum very helpful and great. Currently, I am trying to program a graph. There are nine points on the corners of the 3-D graph and one in the middle. I have created a program that let's the user change the x-axis, y-axis, and z-axis by using labscript under button-edit-mode. However, the nine points do not change. However, I can change these points by manually going to the spreadsheet and entering where I want them to be at.

My question is that if there is a command that let's me edit a cell in the spreadsheet using labscript? (Note: The data in the cells are numeric)

Thanks.
6   L A T E S T    R E P L I E S    (Newest First)
JessieWoo Posted - 08/16/2013 : 04:26:25 AM
Hi Saziku,

Would you please send your .opj file to us and tell me which Origin version you are using? Better with a brief description of where went wrong, error msg if there is, or a screenshot, so I can reproduce it and see what went wrong.

You can follow the instruction in the link below to send us the file.
http://www.originlab.com/index.aspx?go=Support&pid=752

Best Regards,
Jessie
OriginLab Co.
Saziku Posted - 08/14/2013 : 09:23:32 AM
Here's the rest of the program. It comes after the first part above.

getn (Row to start animation:) rowst
(Row to end animation:) rowend
(Rows between samples?) incr
[Oven Temperature];

// For updating time-line
GObject myLine = [Graph5]1!Line1;
range rx = [Book1]"Sensor Location"!col(4);
//Create a video writer object, the file will be rename this to furnace name.avi in user files folder
//You need to specify the file path and name when create video writer object
vw.Create(C:\Users\admin\Desktop\avi files of origin\e-16\E-16 @ 400F 6-8-2012.avi);
for (ii=rowst; ii<rowend; ii=ii+incr) {

wrcopy iw:=[book1]"Delta Temp"! ow:=[book1]"Sensor Location"! c1:=2 c2:=10 r1:=$(ii) r2:=$(ii) dc1:=4 dr1:=1 transpose:=1;

range rr = [book1]"Delta Temp"!;
range rc = [book1]"Sensor Location"!4;
rc[C]$=%(rr)cell($(ii),1)$;

// Redraw so correct time appears
text9.draw();

// Update time-line location in timeseries graph
double newx = time(rx[C]$);
myLine.X = newx;
myLine.draw();
// [Graph5!]Line1.X = newx;
// Line1.draw();
// Wait for graph window to redraw.
sec -pw %h;
//Write the redrawn Graph4 to be one frame in the video
err=vw.WriteGraph(Graph4);
if(err)
break;

JessieWoo Posted - 08/13/2013 : 11:24:15 PM
Hi Saziku,

Would you please provide more details about the "New Updates" you mentioned? The program you wrote works fine on my machine, I can not reproduce the problem you encountered.

Best Regards,
Jessie
OriginLab Technical Support
Saziku Posted - 08/13/2013 : 4:27:00 PM
Hi,

I did say the program was working, and it was until I advanced the program. I figured out the problem with it and exerted this from the programming control. This is a program I typed and was working well until the new updates.

getn (What is the height of the furnace:) height
(What is the width of the furnace:) width
(What is the depth of the furnace:) depth;


layer.x.type = 1;
//
layer.x.from = 0;
//
layer.x.to = width;
//
layer.x.inc = width/4;
//y
layer.y.type = 1;
//
layer.y.from = 0;
//
layer.y.to = depth;
//
layer.y.inc = depth/4;
//z
layer.z.type = 1;
//
layer.z.from = 0;
//
layer.z.to = height;
//
layer.z.inc = height/4;
//Labels the axes
label -xb (Front);
label -yb (Depth);
label -zl (Height);
//For x column in worksheet Sensor Location
range xa = [Book1]Sensor Location!X[2];
xa = width;
range xb = [Book1]Sensor Location!X[4];
xb = width;
range xc = [Book1]Sensor Location!X[6];
xc = width;
range xd = [Book1]Sensor Location!X;
xd = width;
range xe = [Book1]Sensor Location!X[9];
xe = width/2;
// For y column in worksheet Sensor Location
range ya = [Book1]Sensor Location!Y[5];
ya = depth;
range yb = [Book1]Sensor Location!Y[6];
yb = depth;
range yc = [Book1]Sensor Location!Y[7];
yc = depth;
range yd = [Book1]Sensor Location!Y;
yd = depth;
range ye = [Book1]Sensor Location!Y[9];
ye = depth/2;
// for z column in worksheet Sensor Location
range za = [Book1]Sensor Location!Z[1];
za = height;
range zb = [Book1]Sensor Location!Z[2];
zb = height;
range zc = [Book1]Sensor Location!Z[5];
zc = height;
range zd = [Book1]Sensor Location!Z[6];
zd = height;
range ze = [Book1]Sensor Location!Z[9];
ze = height/2;
//

Is there a limit for the command range?
Saziku Posted - 08/13/2013 : 1:46:25 PM
Thank you. This really helped a lot, and I was able to get my program running the way I wanted it to.
JessieWoo Posted - 08/13/2013 : 03:02:34 AM
Hi Saziku,

You can try declaring a range variable for the cell using

Range RangeVariableName = [WorkBookName]SheetNameOrIndex!ColumnNameOrIndex[CellIndex];

Then use "RangeVariableName = ;" to edit the range directly.
You can refer to the Range Notation page for details.

If the cell you want to modify is in the active sheet, you can just use "ColumnNameOrIndex[CellIndex]= ;" to edit the data in the cell.

Best Regards,
Jessie
OriginLab Technical Support

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000