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
 LabTalk Forum
 graph with jpgs import to powerpoint does not work

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
Karsten8 Posted - 06/03/2022 : 03:44:31 AM
Origin Ver. and Service Release: 2022b / 9.9.5.167
Operating System:Win10

Hello Forum,

it would be great if you have some suggestions for my two questions:

1) pef_pptslide can not transfer a graph with jpg's to PowerPoint

We insert 20 jpg's into a graph and want to transfer this graph as picture into a PowerPoint slide. Using this code we get an error message:

{pef_pptslide export:=page mode:=lname slide:=4 insert:=pic keepratio:=1 left:=5 right:=20 top:=9 bottom:=10 slidemode:=insert srcf:=folder$;}

The ppt document opens and imports all graphs but only the graph with jpg's gives the error code. If I delete the jpg's from the graph then the import of the graph works.

error message: Origin C error (24) in X-Function code.
#Command Error!

If I try to use the send-to-ppt-app it seems to have the same problem (without error code - he simply does not transfer the graph with pictures without an error message).

If I Import the graph+jpg as ambedded object the following error answer is given:
(80048240) Microsoft PowerPoint 2013: Shapes.PasteSpecial : Invalid request. The specified data type is unavailable.

Did I miss to use an option within the pef_pptslide or is this a bug?


2) Copy a graph with implemented jpg's and insert it as picture into a new graph or layout window

In one usage scenario we import several hundred of jpgs and this slows the program. Thus we thought to make after importing a copy of the graph with all the Pictures and insert a Picture of this graph+jpg's into a new graph or layout field (then delete the original graph with all jpg's).

Using the option {copypic type:=0 res:=600} we can make a picture and move it to clipboard. But we could not find a command how to paste this picture from clipboard into a new graph window. Do you have an idea how to solve this task?

Thanks for you help.

Best regards,
Karsten8.
3   L A T E S T    R E P L I E S    (Newest First)
Karsten8 Posted - 06/08/2022 : 09:48:42 AM
Dear CP and James,

thanks for your help.

1) the pef_pptslide -> works. I found that if one has too much pictures or a picture with high resolution (my had 600 dpi) in a graph the transfer from origin to powerpoints is extremely slow. I reduced the picture resolution to 120dpi and the transfer worked without problems.

2) The proposed script works well - thanks!

Best regards,

Karsten8.
cpyang Posted - 06/03/2022 : 7:53:18 PM
Yes, take the graph and make it an image to put into layout should work.
The following LT code will export the active graph as png and insert it to completely fill a new layout page.


int nw = page.width;
int nh = page.height;
expG2img path:="%Y" res:=600 name:=test1 type:=png;
win -t layout;
//make layout size matching the graph
page.width=nw;
page.height=nh;
//make layer in layout to exactly fill the page
layer.left=0;
layer.top=0;
layer.width=100;
layer.height=100;
string fname$="%Ytest1.png";
//insert as layer background
insertImg2g type:=img xyp:=2;
page.zoom=0;//reset to full after size change above
page.viewpaper=0;//no need to show the laytout border around the page


You can use
insertImg2g -h
in script window to read more about this XF.

CP
YimingChen Posted - 06/03/2022 : 1:39:57 PM
Hi,

1) Can you attach a project file with such graphs that we can try?
2) you can use the script menu -e 57637 to paste image in clipboard to a graph. Please refer to the page below on finding/executing command with a certain ID.
https://www.originlab.com/doc/LabTalk/ref/Menu-cmd#-e.3B_Execute_the_menu_command_with_the_specified_ID

James

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