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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 trouble with graph naming in batch plotting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

CZA

France
9 Posts

Posted - 09/12/2018 :  3:06:56 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 2018
Operating System: windows 10
Hello
I have numerous plots to draw and I have tried to use batch plotting. It works fine but I have issues with graph naming.
I have tried this :
Graph long name : %(1, @WS) – worked fine-
and
Graph short name : %(1, @WT, 1, 1)
because I want to get as the graph name the value of the first row of the first colon.
let's say for example that this value is for example 86.97144, what I get is G8697144 (without separator, can lead to confusion with value s 10 times less or more).
Actually I would like to get the figure with on 2 digits after the dot. But there the issues comes from my importation filter :
I have to multiply the initial ASCII value by 10000 to get the proper unit and then I would like the final valuer1 (which ranges from 0 to 200.00 to display with only two digits after dot.
I have tried to insert the following lines in the script:
wks.r1.digitMode = 1; // Set Decimal Places
wks.r1.digits = 2; // Two decimal places
but I still get a figures with 5 digits after dot...
what is the proper script ?
And even if the display is proper will it appear correctly in the name of the graph ?
Thanks for helping





CZA

snowli

USA
1413 Posts

Posted - 09/12/2018 :  5:38:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello, I am not sure what is wks.r1 in your script.

If i set
wks.col1.digitmode=1;
wks.col1.digits=2;

Then when doing batch plotting, the graph short name will show only 2 digits after decimal places.

You can add the above script to script after import in Import filter so that after import the column1 displays with 2 decimal places automatically.

Let me know if this works.

Thanks, Snow
Go to Top of Page

CZA

France
9 Posts

Posted - 09/13/2018 :  04:55:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
here is my import filter script :
range r1=1, r2=2, r3=3, r4=4;
r1[L]$=Field;
r1[U]$=mT;
r1=r1*10000; //converts voltage in mT
// Enable digit mode to be "Set Decimal Places"
// and set number of decimal places to 2
wks.r1.digitMode = 1; // Set Decimal Places
wks.r1.digits = 2; // Two decimal places
r2[L]$=Temperature;
r2[U]$=K;
r3[L]$=V3;
r3[U]$=V;
r4[L]$=Phase;
so r1 is equivalent to col1 I think.
All the rest of the script works : naming the colomns, getting the proper units, conversion... but not the display with 2 decimals places : I still get a display with 5 decimal places (the original number had 9, but fortunately I have multiplyed it by 10000...)

CZA
Go to Top of Page

snowli

USA
1413 Posts

Posted - 09/13/2018 :  09:41:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

Not sure why the %(1,@WT,1,1) failed to use display value in your case.

My colleague showed me that you can directly type the following in Graph Short Name box of Batch Plotting dialog
$($(%(1, @WT, 1, 1), .2)*100)

It should get what you want.

Let me know if it works.

Thanks, Snow
Go to Top of Page

CZA

France
9 Posts

Posted - 09/13/2018 :  12:15:12 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for the suggestion. I have tried 4 combinations between short names and long names (I give the examples just for one file):

Short name
$($(%(1, @WT, 1, 1), .2)*100)
Long name
%(1, @WS)
result
G8697 and 2018-09-05-8

Short name
%(1, @WS)
Long name
$($(%(1, @WT, 1, 1), .2)*100)
result
2018-09-05-8 and 8697

Short name
%(1, @WT, 1, 1)
Long name
%(1, @WS)
result
G8697144 and 2018-09-05-8

Short name
%(1, @WS)
Long name
%(1, @WT, 1, 1)
result
2018-09-05-8 and 86.97144

It seems that short names cannot accept special characters. OK. The last solution works fine enough for me, but I still do not understand why the formula you gave does not work when applied to long names...

Note that since I upgraded to version 2018, at the same time I upgraded to Windows 10, I have plenty of trouble handling origin. it is very slow, I have to restart the pc often and so on... Are there compatibility issues ?
Thanks for the suggestion, at least it helped me to find a procedure that works more or less...
I think programming will keep an entire mistery until the end of my life...
Thanks
Claire



CZA
Go to Top of Page

snowli

USA
1413 Posts

Posted - 09/13/2018 :  4:02:39 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
We have an FAQ of slowness related to certain Windows 10 versions.
https://www.originlab.com/doc/Quick-Help/Origin-slow-Windows-10-Fall-Creators-Update-2017

Could you check if this helps?


BTW, you said the formula doesn't work for graph long name? But i saw you pasted
Short name
%(1, @WS)
Long name
$($(%(1, @WT, 1, 1), .2)*100)
result
2018-09-05-8 and 8697


The long name shows 8697 so it is 2 decimal places.


You are right. all child window short names in Origin doesn't support special chars. Also can't start with number. That's why G was added at the beginning for graph short name.


Thanks, Snow
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000