Author |
Topic |
|
flirt
USA
Posts |
Posted - 06/02/2010 : 08:57:45 AM
|
Origin Ver. and Service Release (Select Help-->About Origin): 8.0 SR3 Operating System: winxp
I tried to link 2 columns in 2 sheets by set column values as: [Book1]Sheet2!col(D) but get something like: [BOOK1]SHEET2!Book1_D@9: object property not found! Math cannot be performed on Text column: [BOOK1]POROSITY0_BK1!Book1_D@9
Anybody know how to solve this? Thanks. |
|
VincentLiu
China
Posts |
Posted - 06/03/2010 : 02:00:19 AM
|
You should first define a range variable in the Before Formula Scripts panel and then assign the variable to another column. The following is an example.
Best regards, Vincent OriginLab Technical Services
|
|
|
flirt
USA
Posts |
Posted - 06/03/2010 : 09:22:34 AM
|
wooow, that really helps. Thank you. |
|
|
flirt
USA
Posts |
Posted - 06/03/2010 : 09:54:18 AM
|
Two more questions: If i refer to a cell in another sheet using the method you recommend, it doesn't work:
second, if i change something (e.g., the sheet name), should i manually change this name used in all scripts?
The language Origin uses is quite complicated. Is there a simple tutorial? I know help includes everything but it is still too complicated for general users like me. Many thanks. |
|
|
VincentLiu
China
Posts |
Posted - 06/03/2010 : 10:27:43 PM
|
To the 1st question:
You should use "Range" keyword to define a range variable, but not use "double" keyword. So the variable should be range E1 = [Book1]Modulus!col(B)[1]. For more details about range definition, please refer to
http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:Range_Notation
To the 2nd question:
Of course, you should change the name of a sheet used in all scripts like other programming languages do. For LabTalk is a high-level, full-featured programming language which can easily access to most of Origin's operation with a simple command, I suggest you to get start with the LabTalk User Guide to get a full view of it. It is a example based guide, so you could easily understand the language with it.
http://wiki.originlab.com/~originla/wiki/index.php?title=Category:LT_Guide
If you have any question about Origin, you could send it through
http://www.originlab.com/www/company/qform.aspx?s=1&
Vincent OriginLab Technical Services
|
Edited by - VincentLiu on 06/03/2010 10:28:41 PM |
|
|
flirt
USA
Posts |
Posted - 06/04/2010 : 4:51:10 PM
|
I tried your method but it doesn't work, so I spent some time to read help and finally found a solution. To refer only one cell in another sheet, first define a range in the "before script" window, then refer to cell in script window use E1(1), E1(2) etc. Strangely, E1[1], E1[2] doesnot work.
quote: Originally posted by VincentLiu
To the 1st question:
You should use "Range" keyword to define a range variable, but not use "double" keyword. So the variable should be range E1 = [Book1]Modulus!col(B)[1]. For more details about range definition, please refer to
http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:Range_Notation
To the 2nd question:
Of course, you should change the name of a sheet used in all scripts like other programming languages do. For LabTalk is a high-level, full-featured programming language which can easily access to most of Origin's operation with a simple command, I suggest you to get start with the LabTalk User Guide to get a full view of it. It is a example based guide, so you could easily understand the language with it.
http://wiki.originlab.com/~originla/wiki/index.php?title=Category:LT_Guide
If you have any question about Origin, you could send it through
http://www.originlab.com/www/company/qform.aspx?s=1&
Vincent OriginLab Technical Services
|
|
|
|
Topic |
|
|
|