Author |
Topic  |
|
tomegaspadas
Brazil
3 Posts |
Posted - 01/13/2020 : 7:02:53 PM
|
Origin Ver. and Service Release (Select Help-->About Origin): 9.5 Operating System:Windows 10 Hello guys, is there any way where I can auto format by factor on the tick label? I mean when I import my files I got every thing in scentific notation, then I habe to divide by factor o 100000, but I have a ton of files... so... theres a way that I can do that auto every time I import a file? Thank! |
|
JacquelineHe
287 Posts |
Posted - 01/14/2020 : 03:21:02 AM
|
Hi,
If I do not misunderstand your question, you hope the imported data divide by 100000, and column display set to "Scientific:1E3" when you import them.
If you use the "Import Multiple ASCII" tool to import file, open the import "impASC" dialog, and then expand "Script" node, enter the following Labtalk script in the "Script after Each File Imported" edit box. Then import the files.
int ncols = wks.ncols;
for(int ii = 1; ii<=ncols; ii++)
{
col($(ii))=col($(ii))/100000;
wks.col$(ii).subformat = 2;
}
Then all imported data will divide by 100000, and column display set to "Scientific:1E3"
Thanks Jacqueline OriginLab
|
 |
|
tomegaspadas
Brazil
3 Posts |
Posted - 01/14/2020 : 06:33:56 AM
|
quote: Originally posted by JacquelineHe
Hi,
If I do not misunderstand your question, you hope the imported data divide by 100000, and column display set to "Scientific:1E3" when you import them.
If you use the "Import Multiple ASCII" tool to import file, open the import "impASC" dialog, and then expand "Script" node, enter the following Labtalk script in the "Script after Each File Imported" edit box. Then import the files.
int ncols = wks.ncols;
for(int ii = 1; ii<=ncols; ii++)
{
col($(ii))=col($(ii))/100000;
wks.col$(ii).subformat = 2;
}
Then all imported data will divide by 100000, and column display set to "Scientific:1E3"
Thanks Jacqueline OriginLab
Exactly that, but with out the scientific notation, for example: "9E6" them divide by factor of 100000 and it turns into 500" I want this to happen in the ploted graph and in the woorksheet. Thank you! ps: the script works perfectly, now how I change the display in the worksheet? In the graph is working well :) ps2: change it in the woorksheet as I import the files. :D |
Edited by - tomegaspadas on 01/14/2020 06:44:39 AM |
 |
|
JacquelineHe
287 Posts |
Posted - 01/15/2020 : 03:21:10 AM
|
Hi,
I want to confirm that your original data is "9E6", when you import data you want the data divide by factor of 100000 and NOT need show as scientific notation, right?
If so, it should be shown as "90" but not "500".
And this script is used to set the dataset to scientific notation
wks.col$(ii).subformat = 2;
If you not need to show the data to scientific notation, you just need to remove it in the script.
If I misunderstand your question, could you please show us more detail about it?
Thanks Jacqueline OriginLab |
 |
|
tomegaspadas
Brazil
3 Posts |
Posted - 01/17/2020 : 10:43:28 AM
|
quote: Originally posted by JacquelineHe
Hi,
I want to confirm that your original data is "9E6", when you import data you want the data divide by factor of 100000 and NOT need show as scientific notation, right?
If so, it should be shown as "90" but not "500".
And this script is used to set the dataset to scientific notation
wks.col$(ii).subformat = 2;
If you not need to show the data to scientific notation, you just need to remove it in the script.
If I misunderstand your question, could you please show us more detail about it?
Thanks Jacqueline OriginLab
exactly that!!! thank you |
 |
|
|
Topic  |
|
|
|