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
 Forum for Origin C
 one problem in script

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
guoweiming Posted - 07/20/2009 : 5:37:51 PM
Origin Ver. and Service Release: 7.5
Operating System: windows XP

Hi everyone:
when I use this script language to import data from one window to another:
data1_A=data2_A;
data1_B=data2_B;
when data1 window is empty, it works. But when data1 window has already data in it, it can't be replaced at all.
Is it normal? Have we any method to transfer the data to window even when there are already data in it? Thank u!!!
Weiming Guo

completely new user of Origin. Any help will be appreciated.
6   L A T E S T    R E P L I E S    (Newest First)
Iris_Bai Posted - 07/24/2009 : 05:05:27 AM
Hi,

Please send your Project file(*.opj) and Commands to me.
Please reference the way in this linking to send file: http://www.originlab.com/index.aspx?s=1&lm=123&pid=752

Iris
guoweiming Posted - 07/22/2009 : 6:43:33 PM
now I have 2 worksheet, data1 and data2 containing different data. my goal is to delete the data in data2 and then transfer data1 to data2.

with your method, I can delete the data in worksheet data2, (with set 0 or del command),problem is when I use data2_A=data1_A command to transfer data from data1 to the blanc data2 worksheet, the data before deleting appear!!! but not the data in data1!!!

it maybe I can send my file of origin directly to you, so that you can try on it and find the problem?

completely new user of Origin. Any help will be appreciated.
Iris_Bai Posted - 07/21/2009 : 11:43:12 PM
Hi,

I tried in Origin7.5, call set data1_A -end 0; before running data1_A=data2_A;, works fine. Could you give me more detail steps?

Or you can try the following script:

del -s Data1_B; // delete column B
del -s Data1_A; // delete column A
win -a data1; //activate data1
Worksheet -a 2; // add two columns in data1 worksheet
Data1_A=Data2_A; // copy data
Data1_B=Data2_B;

Iris
guoweiming Posted - 07/21/2009 : 10:22:26 AM
Thank u a lot. I have tried the method but problem exists always.

maybe I should describe the problem more clearly:

in a "new" project (file--new--project), we can use this command
data2_A=data1_A; to copy data

but after copy one time, if we change the content in data1 and execute the command again it doesn't work.

of course we can set a new project everytime, but in reality we need to use the command frequently so ...

thank u.

quote:
Originally posted by Iris_Bai

And you can define a Macro to do this:

def copycol
{ 
      set %2 -begin 0; 	
      set %2 -end 0; // set begin & end to 0 in order to clear existing data
      %2 = %1;   // copy data from one column to another column   
};

copycol data2_A data1_A;
copycol data2_B data1_B;


Iris



completely new user of Origin. Any help will be appreciated.
Iris_Bai Posted - 07/20/2009 : 11:21:33 PM
And you can define a Macro to do this:

def copycol
{ 
      set %2 -begin 0; 	
      set %2 -end 0; // set begin & end to 0 in order to clear existing data
      %2 = %1;   // copy data from one column to another column   
};

copycol data2_A data1_A;
copycol data2_B data1_B;


Iris
Iris_Bai Posted - 07/20/2009 : 11:14:10 PM
Hi,

You can use "set data1_A -end 0;" command to clear data first before copy data. For example,
set data1_A -end 0;
set data1_B -end 0;
data1_A=data2_A;
data1_B=data2_B;

Iris

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