PPT Operations

xSetPPTTextFont

Sets current font info for the added PPT texts in PowerPoint.

bool xSetPPTTextFont(const String sTextFont, int iFontsize)

return

Returns True if successful.

sTextFont

PPT text font name to be added texts.

iFontsize

PPT text font size to be added texts.

xSetPPTTextColor

Sets current text color to be added txt fields in PowerPoint.

bool xSetPPTTextColor(int iR, int iG, int iB)

return

Returns True if successful.

iR, iG, iB

Text color to be added texts in PPT.

xSetPPTTextBackground

Sets the current background color to be added text fields.

bool xSetPPTTextBackground(bool bBackground, int iR, int iG, int iB)

return

Returns True if successful.

bBackground

Set True to enable the background to be added texts.

iR, iG, iB

Background color to be added texts. Valid range 0 to 255.

xAddPPTText

Adds a text in a given position in PowerPoint. This text will be displayed in all slides.

bool xAddPPTText(int x, int y, int w, int h, const String sPPTText)

return

Returns True if successful.

x

Text box left position in the Slide.

y

Text box top position in the slide.

w

Text box width.

h

Text box height.

sPPTText

Text content. It will use current color, font, and size.

xClearPPTTexts

Deletes all texts added using `xAddPPTText <#xaddppttext>`__.

void xClearPPTTexts()

return

None.

Note: This call will not work on a generated PPT.

xSetPPTExportOptions

This method sets the options before exporting a ppt file. This option will be used in xGeneratePowerPoint method.

In GUI

../../_images/12da32fe9d0881987422623583ab052d.png

bool xSetPPTExportOptions(bool bAuto, short iUnit, float fOriginX, float fOriginY, float fWidth, float fHeight, bool bUsePlainBackground)

return

Returns True, if successful.

bAuto

If True, iUnit, fOriginX, fOriginY, fWidth and fHeight will be applied with default values.

iUnit

Sets position and size unit in inch or pixel.

0 - Inches
1 - Pixels

fOriginX

Sets the left position of the image in the PPT.

fOriginY

Sets the top position of the image in the PPT.

fWidth

Set the image width. But this may be adjusted to maintain aspect ratio.

fHeight

Set the image height. But this may be adjusted to maintain aspect ratio.

bUsePlainBackground

Set True to use a plain background in the generated images.

xSetPPTExportOptionsEx

Marks the ppt slide with right or wrong symbol.

When probe labels in the slide meet the set constraints, Tick will be displayed in green color, otherwise, Cross will be displayed in red color.

bool xSetPPTExportOptionsEx(bool bMarker, short iYesMarker, short iNoMarker, float fMarkerX, float fMarkerY, float fMarkerWidth, float fMarkerHeight)

return

Returns True if successful.

bMarker

Set True Enables marker.

iYesMarker

Yes marker symbol.

iNoMarker

No marker symbol.

fMarkerX

Marker left position in the slide.

fMarkerY

Marker top position in the slide.

fMarkerWidth

Marker width in the slide.

fMarkerHeight

Marker height in the slide.

Note: Following link lists more marker symbol values used in PowerPoint.

http://msdn.microsoft.com/en-us/library/office/ff862770(v=office.15).aspx

xSetPPTExportOptionsEx2

Sets mode to create gif animated file for a viewpoint that has CAE animation.

int xSetPPTExportOptionsEx2(bool bGifAnimation)

bGifAnimation

If set as True, it will create an animated gif for a viewpoint that has CAE animation.

If set as False, static image is embedded in PowerPoint.

xGeneratePowerPoint

This method creates a ppt file for all the viewpoints of current viewpath.

String xGeneratePowerPoint (const String sPPTFilePath, const String sTemplatePath)

return

Returns saved file path. If sPPTFilePath is invalid it saves in default path and returns the value.

sPPTFilePath

Path of the PowerPoint file to be saved.

sTemplatePath

PowerPoint template file (.pot) path, to be used in the creation of the ppt file.

xConvert2DLabelsAsPPTText

Converts 2D labels as PPT texts.

bool xConvert2DLabelsAsPPTText(bool bConvert)

return

Returns True, if successful.

bConvert

Set to convert 2D labels as PPT text.