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
 batch export graph with default theme in diff "OPJ
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ytyyutianyun

48 Posts

Posted - 02/13/2014 :  06:30:05 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 8.6 and Service Release 3(Select Help-->About Origin):
Operating System: windows 7

I have 36 OPJs, each has 8 graph. And I set the export graph theme in
"file->export graphs". And I want to batchly export graphs. I give my code, but it errors why?

%A=E:\Sudy\test\3d089.opj;
open -a %A;
export.image
%A=E:\Sudy\test\3d111.opj;
open -a %A;
export.image

The code is error why?

lkb0221

China
497 Posts

Posted - 02/13/2014 :  09:59:58 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Please see the following page and use expgraph X-function to export graphs. This will contain more options.
http://www.originlab.com/doc/X-Function/ref/expGraph

"export.image" is an old command and we do not recommend users to use it any more. Please use the X-function above or "Image.Export" command instead.
http://www.originlab.com/doc/LabTalk/ref/Image-Export-obj

Zheng
OriginLab
Go to Top of Page

ytyyutianyun

48 Posts

Posted - 02/13/2014 :  7:04:50 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
  • expGraph -theme "default" type:=jpg path:= "E:\Sudy\test";

    but it error because only one picture saved.

    The message is as follows:
    >>expGraph -theme "default" type:=jpg path:= "E:\Sudy\test";
    clone Graph0(3) to ZZGraph1(3)
    clone Graph0(3) to ZZGraph1(3)
    clone Graph0(3) to ZZGraph1(3)
    >>



  • Also I find the code
    open -a %A;
    I just want to open the document , is the code right?

  • Can I only save the picture in the 2nd windows of a graph like the following picture.



wait for the answer, thanks.
Go to Top of Page

lkb0221

China
497 Posts

Posted - 02/14/2014 :  10:43:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can open the expGraph dialog, use the GUI to finish your setting and click the right triangle button at upper-right corner to select "Generate Script" to see what the script should be.

"Open -a" is a simple import data file into current worksheet, I'm not sure what do you mean "open the document".

We cannot export a single layer of a graph window. You will have to extract those layers out to separate graph windows and then do the export.

Zheng
OriginLab
Go to Top of Page

greg

USA
1379 Posts

Posted - 02/14/2014 :  12:53:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can export only visible layers so you could right-click on a layer icon and choose to Hide. Export Graph will only export visible layers.

You can use Border or Tight for your Margin Control, however the aspect ratio of the graph will be specific to the exported layer. If you choose Page, the exported image will be just as you see it in Origin.
Go to Top of Page

ytyyutianyun

48 Posts

Posted - 02/14/2014 :  7:46:05 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by lkb0221

Hi,

You can open the expGraph dialog,.....



  • It's great, thanks for making me know that it has the function.


  • open the document means: I want to open several ".opj" files as follows:
    1. open 1.opj
    2. run the command
    3. open 2.opj (close the 1.opj)
    4. run the command
    .
    .
    .


And I found the code:
%A=E:\Sudy\test\3d111.opj;
doc -ss 1;
doc -o %A;
doc -ss 0;
expGraph type:=jpg export:=project filename:=3d<short name> path:="E:\Sudy\test" overwrite:=rename theme:=<Original> tr.Margin:=2;
%A=E:\Sudy\test\3d089.opj;
doc -ss 1;
doc -o %A;
doc -ss 0;
expGraph type:=jpg export:=project filename:=3d<short name> path:="E:\Sudy\test" overwrite:=rename theme:=<Original> tr.Margin:=2;


it is Ok in this request. But it turn off the save flag. Is there better way to do it?



quote:
Originally posted by greg

You can export only .....



Yes, hidden layer is a good idea, I have not imagined. But can I make some command to batchly hide the 1st layer in each graph?

Edited by - ytyyutianyun on 02/14/2014 8:18:07 PM
Go to Top of Page

lkb0221

China
497 Posts

Posted - 02/17/2014 :  1:22:37 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
To loop among all graph windows in a project and hide the first layer:

//Start
doc -e P
{
page.active = 1; // Activate the first layer
layer -h 1; // Hide the layer
}
//End

Besides, just open-export-close a project should not trigger the save flag, I think.

Edited by - lkb0221 on 02/17/2014 1:36:15 PM
Go to Top of Page

ytyyutianyun

48 Posts

Posted - 02/17/2014 :  8:40:33 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by lkb0221

To loop among all graph windows in a project and hide the first layer:

//Start
doc -e P
{
page.active = 1; // Activate the first layer
layer -h 1; // Hide the layer
}
//End

Besides, just open-export-close a project should not trigger the save flag, I think.



Thank you, it solved the problem and you are kind.
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