Author |
Topic |
|
tib
Switzerland
105 Posts |
Posted - 06/11/2007 : 09:52:27 AM
|
Hi, there is the ObjectToolbar for aligning graph objects on a page.
But, is there a way to evenly distribute several marked graphs on a layout? Of course, you could use the grid, but this is not always helpful.
Thanks for hints, Tilman.
|
|
larry_lan
China
Posts |
Posted - 06/12/2007 : 9:57:57 PM
|
Adding graphs in Layout page is just like drawing pictures "freehand", so there is no such tools. How about arranging your graph layers on a graph windows and then paste to the Layout page?
Larry OriginLab Technical Services |
|
|
tib
Switzerland
105 Posts |
Posted - 06/21/2007 : 5:45:43 PM
|
Hi Larry,
no, I want to "program" where the graphs in a layout are located. Kind of a template. But a very flexible (interactive) layout. For example, Graph1 sits at position x1,y1 and has a size of sx1,sy1 Graph2 sits at position x2,y2 and has a size of sx2,sy2 etc. ..if switch SW1 is selected graph3 sits at pos x3,y3 etc...
Most probably some OriginC routine? Tilman.
|
|
|
Mike Buess
USA
3037 Posts |
|
tib
Switzerland
105 Posts |
Posted - 06/22/2007 : 03:21:29 AM
|
Hi Mike, yes I remember. I wanted to know whether there is anything new. But if you say it is not (even with OriginC)... :-( I was hoping for something like: PlaceGraph(LayoutName, GraphName, PosXY, SizeXY);
With the method in the post you mentioned you cannot have a flexible number of graphs in a layout. The re-and-back-naming method also I used works only for a given number of graphs, i.e. you have to know beforehand how many graphs you are going to place. I do not know how to add or remove graphs with LabTalk. A workaround might be that you generate different Layout templates with 1,2,3,...20 graphs positioned somehow and somewhere on the layout. Then you open the layout template with the desired number of graphs and do the rename procedure and shift and scale them as you want. The graphs in the layout are stored as BMP, BMP1, BMP2, etc... You can position them with BMP.top=... BMP.left=... etc.
But is there a way to get the name of the linked object? Is there anything like BMP.name$= or BMP.link$ = Graph1? Because I want to shift Graph1 and I am not interested whether this is BMP, BMP1 or BMP2.
thanks, Tilman.
|
|
|
Mike Buess
USA
3037 Posts |
Posted - 06/22/2007 : 08:20:22 AM
|
Hi Tilman,
quote: But is there a way to get the name of the linked object? Is there anything like BMP.name$= or BMP.link$ = Graph1? Because I want to shift Graph1 and I am not interested whether this is BMP, BMP1 or BMP2.
Actually, this is one area where OC has advantage over LT with graph objects. OC will not get the name of the graph to which the object is linked but it can get the names/properties of existing objects...
Layout gl = Project.ActiveLayer(); foreach (GraphObject go in gl.GraphObjects) { out_str(go.GetName()); out_str(go.GetObjectType()); out_double("left=",go.Left); out_double("top=",go.Top); // etc. }
...I guess you can do something similar in LabTalk...
doc -e G { // loop through all objects %B=; // object name %B.left=; %B.top=; };
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 06/22/2007 08:23:47 AM
Edited by - Mike Buess on 06/22/2007 09:29:04 AM |
|
|
|
Topic |
|
|
|