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
 Execute Vertical Translate Command in LabTalk
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jamstorp

Switzerland
4 Posts

Posted - 03/12/2014 :  06:35:43 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Dear all,

I would like to execute the menu command:

Analysis : Data Manipulation : Vertical Translate

in LabTalk with the same features as if I would click in the menu.

I have tried to write:

curve translate ntype:=0;

in my .ogs-file with no success or error message.

Can you please help me? Thanks, Erik J Berg.

-----
Origin 9.0.0 (64-bit) SR2
Windows 7 Enterprise

lkb0221

China
497 Posts

Posted - 03/12/2014 :  1:11:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Vertical/Horizontal Translate modifies the original data directly, so you can just add offset to your Y data column to implement vertical translate.

Zheng
OriginLab
Go to Top of Page

jamstorp

Switzerland
4 Posts

Posted - 03/12/2014 :  1:44:33 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for your reply!

However, immediately after executing my LabTalk-script I would like to manually shift data vertically with the mouse, without having to click on "vertical translate" in the menu.

It would save me a lot of time. Is this possible?

Best regards, Erik J Berg
Go to Top of Page

lkb0221

China
497 Posts

Posted - 03/12/2014 :  1:53:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Then try this:

menu -e 19166;

Zheng
OriginLab
Go to Top of Page

jamstorp

Switzerland
4 Posts

Posted - 03/12/2014 :  3:55:10 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Thanks again for your reply, but it doesn't happen anything when I type it inside my .ogs file or if I write it directly into the "Script Window". Probably "Vertical translate" has another menu id.. Is it the same for my version of Origin 9.0.0?

Thanks for the help, Best, Erik J Berg
Go to Top of Page

lkb0221

China
497 Posts

Posted - 03/12/2014 :  4:08:03 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Sorry about that.
I tested again in 9.0SR2, the menu ID is 49870.

If it still not working, you can use "menu.lastExeID" to check the last menu operation ID you did.

Vertical/Horizontal Translate are different from other X-functions and we thought it is unnecessary to add script command.

Zheng
OriginLab

Edited by - lkb0221 on 03/12/2014 4:08:26 PM
Go to Top of Page

jamstorp

Switzerland
4 Posts

Posted - 03/12/2014 :  4:18:48 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks a lot! I found it out after using "menu.lastExeID". It was 49838 in my version.

Now it all works nicely! Best wishes, Erik
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