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 for Programming
 LabTalk Forum
 Bug: Set first tick using date format
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

additive

Germany
109 Posts

Posted - 03/25/2010 :  09:36:38 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

greg

USA
1378 Posts

Posted - 03/26/2010 :  10:25:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.
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