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
 Project Filename and Path
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

LabTalk user

USA
35 Posts

Posted - 11/10/2010 :  6:39:16 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.1 SR3
Operating System: Windows XP

I am trying to make a custom export button which automatically displays the project filename and path of where the project is saved on the graph. I am wondering how to access the project path and filename automatically without having to make the user re-enter it. Is there a variable that information is always stored in?

Thanks!

cpyang

USA
1406 Posts

Posted - 11/10/2010 :  11:07:26 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Sytem String Registers, %X and %G,

http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:String_registers

CP
Go to Top of Page

larry_lan

China
Posts

Posted - 11/15/2010 :  03:26:41 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi:

Maybe you can look at the Example 5 about Label command.

Thanks
Larry
OriginLab

Edited by - larry_lan on 11/15/2010 03:30:05 AM
Go to Top of Page

LabTalk user

USA
35 Posts

Posted - 11/16/2010 :  10:01:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you. This is exactly what I'm looking for. I also have one more question, the menu -e command is good for executing options like print within a script. Is there a 5 digit code for the export graph? So far when I hit the control + shift and click on the menu button it brings up the x-function code.

Thanks!
Go to Top of Page

greg

USA
1379 Posts

Posted - 12/14/2010 :  11:18:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
We never recommend using the menu id since we do not guarantee the id will persist between versions - thus breaking your code.

The export graph X-Function (expGraph) is easily programmed, especially in 8.1SR3.

With a graph active, open the export graph dialog.
Choose "Specified" as the 'Export'.
Enter 'File Name(s)' as "My File".
Choose "Auto Rename" for 'Overwrite Existing'.
Set any other properties as you wish.
Now click the flyout button to the right of 'Dialog Theme' and choose the 'Generate Script' option.

You can complete the export as a test of your settings, but you now have a script that does the job. Edit the
pages:=value
filename:="value"
path:="value"
as needed.
Go to Top of Page

LabTalk user

USA
35 Posts

Posted - 12/15/2010 :  3:26:49 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Greg, that is extremely helpful for exporting files in a script. I should have been a little more specific regarding what I am looking for. I want to just bring up the export graph dialog box in the middle of the script. I want to allow the user to alter things within the dialog box and then once they hit 'OK' it returns to running the script.

How would I go about implementing this?

Thanks for the advice!
Go to Top of Page

greg

USA
1379 Posts

Posted - 12/20/2010 :  5:16:23 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
expGraph -d;

... brings up the Export Graph dialog.

Script will not continue unless and until the user clicks OK and the export finishes.
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