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
 Exporting all non-hidden graphs with 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

johannes.kastl

Germany
71 Posts

Posted - 04/01/2012 :  01:50:53 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello everyone,

I am trying to get origin to export all non-hidden graphs in a project.

Exportin *all* graphs with 'doc -e P' works fine, and allows me to change the name of the exported image to %G--%(page.label$).

I found 'doc -e O', which loops through all non-minimized windows. But apparently non-minimized is not the same as non-hidden. (And by hidden, I mean what you get by right-clicking on a graph in the proejct explorer and selecting 'Verbergen' in the german GUI, could be 'Hide' in the english GUI).

Another way would be to use 'exgraph exp=:open' which only exports non-hidden graphs in the active folder. And I cant seem to get it to rename the file, as only '<long name>' is possible, not when it is connected to %G or similar.

I also found no property, that shows if a page is hidden.

Any hints? Aything I missed in the wiki and the forum?

Thanks a lot in advance.

Laurie

USA
404 Posts

Posted - 04/02/2012 :  12:33:38 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Try the following:

string filename$=%G<long name>;
exgraph exp=:open filename:=filename$;

OriginLab Technical Support
Go to Top of Page

Laurie

USA
404 Posts

Posted - 04/02/2012 :  2:21:32 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I'm sorry...I had some typos in that. It should have been:

string filename$=%G<long name>;
expgraph exp:=open filename:=filename$;

but also, <long name> does not work. The file name will be "long name" and not the name of the graph window.

OriginLab Technical Support
Go to Top of Page

Laurie

USA
404 Posts

Posted - 04/02/2012 :  3:12:03 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi again,

The script I gave will work in 8.6 SR3 (which is expected very soon).

In the meantime, it seems you did not miss anything in LabTalk, but in Origin C you could use the Page.GetShow( ) method.

-Laurie

OriginLab Technical Support
Go to Top of Page

johannes.kastl

Germany
71 Posts

Posted - 04/02/2012 :  3:14:52 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Laurie,

thanks for your answers. Nice to hear there is a way.

And Im glad my company is planning to upgrade from 8.1 to 8.6 in the near future...
Go to Top of Page

johannes.kastl

Germany
71 Posts

Posted - 04/19/2012 :  3:34:46 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by Laurie
The script I gave will work in 8.6 SR3 (which is expected very soon).



We just upgraded to Origin 8.6.0 SR3 Pro at work, and I wanted to test your script. But it did not work.

I tried all of the three options (Short name, long name and Graph ##), but only the latter one worked at all. Even when using 'filename:=<long name>' (i.e. not in combination with %G or anything else), I did not work.

Are you sure this code worked for you? You mentioned typos, but the two pieces of code that you gave where exactly the same.

Thanks in advance,
Johannes
Go to Top of Page

easwar

USA
1965 Posts

Posted - 04/20/2012 :  11:39:56 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Johannes,

I just tried:

string filename$=<long name>;
expgraph exp:=open filename:=filename$;

as well as

string filename$=%g-<long name>;
expgraph exp:=open filename:=filename$;

and it all worked fine for me....I got exported files with the appropriate names.

What does it do for you? Did the export fail? Or you got the files with incorrect names? Were there any error messages? What do you see in the new "Messages Log" window which is docked to the left in auto_hide mode?

Easwar
OriginLab
Go to Top of Page

johannes.kastl

Germany
71 Posts

Posted - 04/21/2012 :  10:10:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi easwar,

it basically is the same problem that I described in my first post.

Using <Graph ##> generates multiple files, named 'Graph 01', 'Graph 02',...

Using <long name> or <short name> generates one file, which is named 'long name.emf' or 'short name.emf'. And it exports each of the non-hidden graphs to this file, so afterwards it contains only the graph exported last.

The substitution of <long name> to the actual long name of the graph had worked in the older version of Origin, but only when used 'as is'. Combined with %G-- or anything else it failed, see my first post.

Edited by - johannes.kastl on 04/21/2012 10:10:44 AM
Go to Top of Page

Penn

China
644 Posts

Posted - 04/23/2012 :  03:34:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I have tested in German version of 8.6 SR3, and the following script cannot parse "<long name>" as the Long Name of the graph, however, which works in English version.

string filename$=%g-<long name>;
expgraph exp:=open filename:=filename$;

I have added this issue (ID is ORG-5532) to our database for bug tracking. Thank you for pointing out this, and sorry for the inconvenience.

Penn
Go to Top of Page

johannes.kastl

Germany
71 Posts

Posted - 04/23/2012 :  3:13:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for your answer. Hope its getting fixed soon.

In the meantime, Im trying to solve the problem with a origin C file. See originlab.com/forum/topic.asp?TOPIC_ID=10502.
Go to Top of Page

Penn

China
644 Posts

Posted - 04/24/2012 :  05:26:55 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

In German version of Origin, you can use <Langname> instead of <long name>. For example, you can try:

string filename$=%G<Langname>; 
expgraph exp:=open filename:=filename$;


Penn
Go to Top of Page

johannes.kastl

Germany
71 Posts

Posted - 04/24/2012 :  4:02:35 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Penn,

I can confirm that <Langname> works in the German Version of 8.6.0 SR3, also in combination with %G-- or similar.

Thanks a lot for the help and the solution.
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