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
 Forum for Origin C
 Create Layout with originc
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bbjjbb

7 Posts

Posted - 07/29/2009 :  07:13:54 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release: 8SR5
Operating System: WinXP

Hi

How can I manipulate "Layout" pages?
I wrote a script creating multiple graphs and want them to be ready to print on one page...

Any ideas? Labtalk would be OK, too.

Thanks

Iris_Bai

China
Posts

Posted - 07/29/2009 :  10:24:14 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

If you want to copy the layers from multiple graph pages into ONE page and arrange layers to 4 row x 1 col or 2 row x 2 col, please see the example codes in this wiki page
http://ocwiki.originlab.com/index.php?title=OriginC:Copy_and_Arrange_Layers

Iris
Go to Top of Page

bbjjbb

7 Posts

Posted - 07/30/2009 :  03:27:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hey,
thanks.

Can I copy a table to a GraphPage, too?
And: Can I set different sizes for the different plots?

like this:
Go to Top of Page

Iris_Bai

China
Posts

Posted - 07/31/2009 :  06:31:49 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can use CreateLinkTable function to create a worksheet table on graph, see http://ocwiki.originlab.com/index.php?title=OriginC:Graph_Add_Wks_Table for example.

And if want to set differnet size for each layer, you can use

bool	layer_get_position(GraphLayer& gl, double* pLeft = NULL, double* pTop = NULL, double* pRight = NULL, double* pBottom = NULL, int* pUnit = NULL);

bool 	layer_set_position(GraphLayer& gl, double dLeft = 0, double dTop = 0, int* pUnit = NULL);

bool	layer_set_size(GraphLayer& gl, double& dWidth, double& dHeight, int* pUnit = NULL);


There are many layer size and position functions in OriginC\Originlab\graph_utils.h file. In codes need include this header with "#include <..\Originlab\graph_utils.h>" and need add \OriginC\Originlab\graph_utils.c to current workspace.




Iris

Edited by - Iris_Bai on 08/03/2009 11:18:46 PM
Go to Top of Page

bbjjbb

7 Posts

Posted - 08/04/2009 :  05:20:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi again,

1. Thanks for all the tipps
2. I have another problem:
When using page_arrange_layers() the text labels I added to the various graphs sometimes get collect in the middle of the sheet. I allready tried to remake them after the arranging with the same result...
Any ideas how to solve this?
Go to Top of Page

Iris_Bai

China
Posts

Posted - 08/05/2009 :  02:55:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi

Sorry, I cannot reproduce the problem you said above. I changed the example in this wiki page http://ocwiki.originlab.com/index.php?title=OriginC:Copy_and_Arrange_Layers to separate two functions, one is prepare_graphs to generate multiple graph pages, and another function arrange_all_graphs_into_one_graph is to arrange all layers from all graphs in current project to one new graph. You can run the first function to create pages, add Text Label on each graph, then call the second function to arrange layers. To see if still have same problem?
Or can you send your graphs to me? Click Here to send files to me. Better send *opj file.

Iris
Go to Top of Page

bbjjbb

7 Posts

Posted - 08/05/2009 :  03:52:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hey

I sent the file to you (using the form)

I'm afraid I can't send you my "real" opj, so I used your example code to make a demonstration opj.
I just inserted:

GraphObject grobj = gl.CreateGraphObject(GROT_TEXT,"textLabel");
char strLabel[100];
sprintf(strLabel,"LabelTest\n Label for graph %d",nYIndex);
grobj.Text=strLabel;

right after gl.Rescale();

As you can see in the example opj all the labels are in the same place
Go to Top of Page

Iris_Bai

China
Posts

Posted - 08/05/2009 :  05:19:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I found in Origin8 SR5, the attach property of graph object created by GraphLayer::CreateGraphObject is Page, this is incorrect, should be Layer. But this bug already fixed in SR6.

In SR5, you can use the following way to change attach property from Page to Layer:

if(0 != grobj.Attach) //0 - to Layer; 1 - to Page; 2 - to Layer and Scales
    grobj.Attach = 0;


Iris
Go to Top of Page

bbjjbb

7 Posts

Posted - 08/05/2009 :  05:27:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks, I'll try that.

where can I get SR6?
when trying to download it I'm always getting an "File not found"-error.
I tried to download it from the servers in Germany and the US

Edited by - bbjjbb on 08/05/2009 05:28:18 AM
Go to Top of Page

Echo_Chu

China
Posts

Posted - 08/05/2009 :  11:41:25 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can check for update for clicking Help: Check for Updates in Origin.

Or download the SR6 patch from this page.

http://www.originlab.com/index.aspx?s=9&lm=394&pid=1214

Echo
OriginLab Corp
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