Exports the sketch to an EMF file.


Send_Message(OLECtrlEntID, "OLE.MakeMetafile", FilePath, SupportPDF)


FilePathThe path and filename of the metafile to be created
SupportPDFA flag indicating that the metafile needs to work in a PDF


The MakeMetaFile method exports the sketch to an EMF image. Metafiles are vector images, as opposed to raster images like bitmaps. Vector images scale to the current resolution of the device and can be very useful when printing.

Unfortunately, metafiles don't play nicely within PDFs unless each of the objects have backgrounds. If you plan to embed the metafile in a PDF, then you need to set the SupportPDF parameter to 1. The result of giving all sketch objects backgrounds preserves aspect ratio within a PDF at the expense of objects blocking other objects. Thus, it's best to set the SupportPDF parameter to 0 whenever possible.


// Export a metafile
Send_Message(@Window:".OLE_SKETCH", "OLE.MakeMetaFile", "Sketch.emf", 0)

// Export a metafile supporting PDF
Send_Message(@Window:".OLE_SKETCH", "OLE.MakeMetaFile", "SketchForPDF.emf", 1)

See Also


  • No labels