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
 LabTalk Forum
 Bug: Set first tick using date format

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
additive Posted - 03/25/2010 : 09:36:38 AM
Origin Ver. 81SR2 and many before
Operating System: Windows XP

Setting the first tick via LabTalk fails when label type is a date format.

Demo: Create a new graph window and set the following X axis properties using scale dialog:
label type: date
label subtype: first type (German Origin: 25.03.2010)
from: 16.03.2010
to: 21.03.2010
inc: 1day
first tick: 16.03.2010 12:00

Now get the properties by

layer1.x.labeltype=;
layer1.x.labelsubtype=;
layer1.x.inc=;
layer1.x.from=;
layer1.x.to=;
layer1.x.firsttick=;

One should get

LAYER1.X.LABELTYPE=4
LAYER1.X.LABELSUBTYPE=1
LAYER1.X.INC=1
LAYER1.X.FROM=2455271
LAYER1.X.TO=2455276
LAYER1.X.FIRSTTICK=2455271,5


Now create another graph and apply these settings using LabTalk.
The first tick is not set correctly.

I could not find a workaround using another date/time format. How can I achieve this scale format I'm able to get using the frontend?

-Michael

1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 03/26/2010 : 10:25:54 AM
This is definitely a quirk of the First Tick control. When you use numerical assignment, storage does contain the correct value, but the graph never seems to 'get it'.
The solution is to use string assignment, as in ..

LAYER1.X.FIRSTTICK$ = 16.03.2010 12:00;

If you are getting information from one Graph/Layer to apply to another you can use ..

DateValue = Graph1!layer1.x.firsttick;
string str$ = $(DateValue,D10); // D10 is MM/dd/yyyy hh:mm
Graph2!layer1.x.firsttick$ = str$;

I did not test in German Regional settings, so let me know if this works.

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