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
 Origin Forum
 how to create wmf output from origin
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bnebenda

Germany
4 Posts

Posted - 05/08/2003 :  07:05:28 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

I'd like to create windows metafile (or other formats suitable to be imported into Word/Powerpoint Documents) from Origin. Is there a convenient way to do this. Up to now I convert the Printfiles (Postscript) using an offline tool.

Thanks for your help

Bernd

hajo_old

Germany
141 Posts

Posted - 05/08/2003 :  07:55:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello, Bernd

I wrote the following function exporting WMF's from all graphics files created within a Project folder.

Mayby, this is an example for you and leads you the way to code your own stuff!

Happy coding ...
If there are questions, feel free to contact me
mailto:hans-joerg.koch@siemens.com

Hajo





void _exportWMF_Project_Folder()
{
PageBase gp;
// Create a Project object
Folder aktFld;
aktFld = Project.ActiveFolder();

string strPath="NULL";
strPath = BrowseGetPath(NULL, "Ausgabepfad fr WMF Export auswhlen");

if (strPath != "")
{
// Loop over all the pages in the project and display their names:
//progressBox aa("exportiere Grafiken nach WMF (gesamtes Projekt) ...");
int imax = 0;
int z = 0;
// Bestimmung von imax = Anzahl der Graph-Dateien im Projekt
foreach (gp in Project.ActiveFolder().Pages)
{
if (gp.GetType()==EXIST_PLOT)
{
imax++;
}
}
printf("Anzahl Grafiken %i\n", imax);

//aa.SetRange(0,imax);
foreach (gp in aktFld.Pages)
{
if (gp.GetType()==EXIST_PLOT)
{
//aa.Set(z++);
string strfname, strFldName;
// out_str(gp.GetName());
// Export der Grafiken durchfuehren
// Dateiname generieren:
// <Projektordner>_<GrafikObjekt-Label>.WMF
Folder fld;
fld = Project.GetFolderWithPage(gp.GetName());
fld.GetName(strFldName);

PageBase pb(gp.GetName());
strfname = strFldName + "_" + pb.label;
strfname.Replace(" ", "_");

gp.Show();
// Ausgabestring festlegen
strfname = strPath + strfname + ".WMF";
out_str(strfname);
string lt_str = "export.image(\""+strfname+"\", WMF)";
LT_execute(lt_str);
}
}
printf("WMF-Export von %i Dateien abgeschossen", imax);
}
else
{
MessageBox( NULL, "WMF-Export abgebrochen!", "Warning!", MB_ICONEXCLAMATION | MB_OK | MB_APPLMODAL)
}
}



mailto:hans-joerg.koch@siemens.com

-- --
Dipl.-Ing. Hans-Joerg Koch
Siemens VDO, Regensburg

SVDO_Origin1
Go to Top of Page

greg

USA
1379 Posts

Posted - 05/09/2003 :  12:36:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
User SVDO_Origin1 provides some excellent Origin 7 OriginC code to export all graphs in a project, but our records indicate you have Origin 6.1 (no OriginC) and I think you were just looking for a simpler solution.
With any Graph window active, you can select File : Export Page from the menu to save your graph in a number of different file formats - including Encapsulated PostScript (EPS), Windows MetaFile (WMF) and Enhanced MetaFile (EMF). Any of these should work in Office applications. You can also go 'through' the Clipboard by selecting Edit : Copy Page.
Keep in mind that Word and PowerPoint (for example) can treat the same file differently (and the Clipboard is basically a metafile), and you can fiddle with the Origin options under Tools : Options : Page and adjust the export options by selecting Show Export Options.


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