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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Adding options to the export_page command

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
johannes.kastl Posted - 04/23/2012 : 3:12:10 PM
Hello,

as described in originlab.com/forum/topic.asp?TOPIC_ID=10387 Im trying to export all non-hidden graphs in a origin project. As it does not work atm with labtalk, Im trying to solve the problem with origin c.

Writing a little script, compiling, writing another ogs script calling the function, adding a button. Seems like it could work.

But what I am missing is documentation about the export_page function, especially about the options.

Using labtalk I would try it like this

expGraph type:=emf overwrite:=replace path:="%X" filename:="%G--%(page.label$)"
		tr.margin:=2
		tr1.unit:=3 
		tr1.Width:=100
		tr2.tif.dotsperinch:=300


tr1.unit is setting the export to ratio, tr1.width sets the ratio to 100%. tr.margin sets the export mode to use the whole page.

How to do the same with export_page?

I would be glad for any hints, even if you tell me to rtfm. As long as you point out which fm ich should r. I have found not much documentation about export_page.

Thanks in advance!

Johannes
4   L A T E S T    R E P L I E S    (Newest First)
Penn Posted - 04/25/2012 : 11:01:45 PM
Hi Johannes,

I have checked with our developer about the TreeNode option in the export_page function. The settings is not so powerful as using expGraph, and it is also complicated. So, this usage is not recommended. It is more easier for such case to call expGraph in Origin C, though it does not look so good as you said.

Penn
johannes.kastl Posted - 04/24/2012 : 4:05:29 PM
Thanks for the answer. I had already found that way. But isnt calling a labtalk 'function' from Origin C a rather ugly way? Or is export_page really missing these options?

Its not urgent anymore, as the labtalk way to export all graphs seems to work. Just out of interest.
Penn Posted - 04/24/2012 : 05:44:59 AM
Hi,

Please refer to your original post for the workaround of LabTalk.

Penn
Penn Posted - 04/24/2012 : 04:09:28 AM
Hi Johannes,

If using Origin C, you can try the following example.

void test_expgraph_lt()
{
	GraphLayer gl = Project.ActiveLayer();  // get the active graph layer
	if(!gl)
		return;
	
	// construct the LabTalk command
	string strCmd = "expGraph type:=emf overwrite:=replace path:=G:\\";
	strCmd += " filename:=\"";
	strCmd += Project.GetName();  // project name
	strCmd += "--";
	strCmd += gl.GetPage().GetName();  // graph name
	strCmd += "\" tr.margin:=2 tr1.unit:=3 tr1.Width:=100 tr2.tif.dotsperinch:=300;";
	LT_execute(strCmd);  // execute the LabTalk script
}


Penn

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000