SaveGraphics
Saves the graphics of the first graphics window of the document to a WMF, PNG or SVG (Scalable Vector Graphics) file. Use SVG file type if you plan to edit graphics in PowerPoint of Adobe Illustrator.
Syntax
SaveGraphics(doc, filePath, graphicsFileType)
Parameters
Parameter |
Type |
Description |
---|---|---|
doc |
documentReference |
Reference to the document. |
filePath |
string |
Graphics file path |
graphicsFileType |
number |
Graphics file type (0: WMF, 1: PNG, 2: SVG, 3: EMF, 4: TIFF). |
Return
None.
Examples
Python
import nex
doc = nex.GetActiveDocument()
nex.ApplyTemplate(doc, "PerieventHistograms")
nex.SaveGraphics(doc, "C:\\Data\\NexGraphics.wmf", 0)
nex.SaveGraphics(doc, "C:\\Data\\NexGraphics.png", 1)
nex.SaveGraphics(doc, "C:\\Data\\NexGraphics.svg", 2)
nex.SaveGraphics(doc, "C:\\Data\\NexGraphics.emf", 3)
nex.SaveGraphics(doc, "C:\\Data\\NexGraphics.tiff", 4)
NexScript
doc = GetActiveDocument()
ApplyTemplate(doc, "PerieventHistograms")
SaveGraphics(doc, "C:\Data\NexGraphics.wmf", 0)
SaveGraphics(doc, "C:\Data\NexGraphics.png", 1)
SaveGraphics(doc, "C:\Data\NexGraphics.svg", 2)
SaveGraphics(doc, "C:\Data\NexGraphics.emf", 3)
SaveGraphics(doc, "C:\Data\NexGraphics.tiff", 4)