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
 Create Layout with originc

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
bbjjbb Posted - 07/29/2009 : 07:13:54 AM
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
9   L A T E S T    R E P L I E S    (Newest First)
Echo_Chu Posted - 08/05/2009 : 11:41:25 PM
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
bbjjbb Posted - 08/05/2009 : 05:27:52 AM
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
Iris_Bai Posted - 08/05/2009 : 05:19:37 AM
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
bbjjbb Posted - 08/05/2009 : 03:52:11 AM
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
Iris_Bai Posted - 08/05/2009 : 02:55:48 AM
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
bbjjbb Posted - 08/04/2009 : 05:20:02 AM
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?
Iris_Bai Posted - 07/31/2009 : 06:31:49 AM
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
bbjjbb Posted - 07/30/2009 : 03:27:06 AM
Hey,
thanks.

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

like this:
Iris_Bai Posted - 07/29/2009 : 10:24:14 PM
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

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