Author |
Topic  |
|
jamstorp
Switzerland
4 Posts |
Posted - 03/12/2014 : 06:35:43 AM
|
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
|
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 |
 |
|
jamstorp
Switzerland
4 Posts |
Posted - 03/12/2014 : 1:44:33 PM
|
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 |
 |
|
lkb0221
China
497 Posts |
Posted - 03/12/2014 : 1:53:59 PM
|
Hi,
Then try this:
menu -e 19166;
Zheng OriginLab |
 |
|
jamstorp
Switzerland
4 Posts |
Posted - 03/12/2014 : 3:55:10 PM
|
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 |
 |
|
lkb0221
China
497 Posts |
Posted - 03/12/2014 : 4:08:03 PM
|
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 |
 |
|
jamstorp
Switzerland
4 Posts |
Posted - 03/12/2014 : 4:18:48 PM
|
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 |
 |
|
|
Topic  |
|