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
 Origin Forum
 trouble with graph naming in batch plotting

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
CZA Posted - 09/12/2018 : 3:06:56 PM
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
5   L A T E S T    R E P L I E S    (Newest First)
snowli Posted - 09/13/2018 : 4:02:39 PM
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
CZA Posted - 09/13/2018 : 12:15:12 PM
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
snowli Posted - 09/13/2018 : 09:41:59 AM
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
CZA Posted - 09/13/2018 : 04:55:47 AM
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
snowli Posted - 09/12/2018 : 5:38:07 PM
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

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