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
 Origin Forum
 Fit Page to Layers pfit2l, batch mode?

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
dekos Posted - 08/17/2021 : 08:25:29 AM
Origin Ver. and Service Release (Select Help-->About Origin): 2021b
Operating System: Win10

Hello,
I would like to perform "Fit page to layers" on multiple graphs, all in the same way. How can I do that? The dialog doesn't have this option, but maybe via LabTalk?
pfit2l margin:=tight direction:=height;

How can I perform this command on every graph in my folder?

Thx!
6   L A T E S T    R E P L I E S    (Newest First)
yuki_wu Posted - 12/01/2021 : 01:03:04 AM
Hi,

I am glad to let you know that Origin 2022 is available!

We have fixed the bug of Fix Page to Layers (ID: ORG-23792-P2) in Origin 2022.

Please download Origin 2022 from the link below, install and have a try.
http://www.originlab.com/demodownload.aspx

Best regards,
Yuki
snowli Posted - 08/17/2021 : 12:30:38 PM
Hello,
Thanks for sending the files. Here are issue i saw:
After open them in Origin, i saw graph6 and 2 have x axis label and title out of the page.
If I hide them immediately in Origin after openning them into Origin and execute the script, ==> graph6 and 14 have x axis label and title outside the page.
So I jiraed the issue in ORG-23792 P2.

After opening them in Origin, if i activated each graph once and then hide them and execute the script no issue.

I will ask our developer to check.

Thanks, Snow
dekos Posted - 08/17/2021 : 10:18:07 AM
unfortunately, repeating the command doesn't always solve it. i have to select every graph and repeat the command...
and sometimes the legend gets out of the graph...

https://my.originlab.com/ftp/forum_and_kbase/Images/Graph6.oggu
https://my.originlab.com/ftp/forum_and_kbase/Images/Graph2.oggu
https://my.originlab.com/ftp/forum_and_kbase/Images/Graph14.oggu

14 is ok, 2 is ok, 6 is not
https://my.originlab.com/ftp/forum_and_kbase/Images/Graphs-cropped.zip
snowli Posted - 08/17/2021 : 10:05:42 AM
I make some graph hidden and some not and run the code. No difference.

Does it happen to all hidden graphs or only specific one?
Do you mind letting me know the original dimension of the graph so i can check if hidden or not makes difference?

Or could you save the problematic graph window as oggu file and share with me so i can try?

Thanks, Snow
dekos Posted - 08/17/2021 : 09:58:28 AM
Nice, thank you.

But I've noticed one strange thing: If the graph is hidden when performing the command, it gets cropped too much (see below). Luckily, repeating the command when graph is not hidden anymore, gets the desired result.

snowli Posted - 08/17/2021 : 09:14:21 AM
Hello,
U can use document command loop over all graphs in active folder
doc -ef LP
{pfit2l margin:=tight direction:=height;}

See the following pages of how to loop over objects in Origin and document command page for all options.
https://www.originlab.com/doc/LabTalk/guide/Looping-Over-objs#Looping_Over_Graph_Windows
https://www.originlab.com/doc/labtalk/ref/document-cmd#-ef.3B_Execute_the_given_script_for_all_objects_in_the_current_folder

Thanks, Snow

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