Difference between revisions of "PptFile class"
CGHelpdesk (talk | contribs) |
CGHelpdesk (talk | contribs) |
||
Line 12: | Line 12: | ||
|Methods= | |Methods= | ||
{{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>AddSlide</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>AddSlide</nowiki>|Parameters= | ||
− | {{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki> | + | {{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutNameOrType</nowiki>|Description=<nowiki>Layout name or type from the master slide.</nowiki>}} |
|Description=<nowiki>Add a new blank slide based on the given master slide.</nowiki>}} | |Description=<nowiki>Add a new blank slide based on the given master slide.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Clear</nowiki>|Description=<nowiki>Remove all slides. Keep all master slides.</nowiki>}} | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Clear</nowiki>|Description=<nowiki>Remove all slides. Keep all master slides.</nowiki>}} | ||
Line 31: | Line 31: | ||
|Description=<nowiki>Return a list of diagram names that can be used in SetDiagram and other diagram functions.</nowiki>}} | |Description=<nowiki>Return a list of diagram names that can be used in SetDiagram and other diagram functions.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetAllMasterTextBoxes</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetAllMasterTextBoxes</nowiki>|Parameters= | ||
− | {{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki> | + | {{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutNameOrType</nowiki>|Description=<nowiki>Layout from the master slide.</nowiki>}} |
|Description=<nowiki>Return a list of text box names that can be used in SetText for the given slide.</nowiki>}} | |Description=<nowiki>Return a list of text box names that can be used in SetText for the given slide.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetAllTables</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetAllTables</nowiki>|Parameters= | ||
Line 47: | Line 47: | ||
|Description=<nowiki>Find a slide based on the name. Return -1 if not found.</nowiki>}} | |Description=<nowiki>Find a slide based on the name. Return -1 if not found.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>GetMasterTextFields</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>GetMasterTextFields</nowiki>|Parameters= | ||
− | {{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki> | + | {{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutNameOrType</nowiki>|Description=<nowiki>Layout from the master slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>}} |
|Description=<nowiki>Get the number of parameters needed to format the fields in the text box with the given name.</nowiki>}} | |Description=<nowiki>Get the number of parameters needed to format the fields in the text box with the given name.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>GetSlideIdxByName</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>GetSlideIdxByName</nowiki>|Parameters= | ||
Line 78: | Line 78: | ||
|Description=<nowiki>Set the values of the diagram with the given name on the given slide to the values given.</nowiki>}} | |Description=<nowiki>Set the values of the diagram with the given name on the given slide to the values given.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetMasterAndLayout</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetMasterAndLayout</nowiki>|Parameters= | ||
− | {{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki> | + | {{CGscriptParameters_Template|Type=number|Name=<nowiki>idx</nowiki>|Description=<nowiki>Index of slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutNameOrType</nowiki>|Description=<nowiki>Layout from the master slide.</nowiki>}} |
|Description=<nowiki>Set the layout on the given slide to the layout from the given master.</nowiki>}} | |Description=<nowiki>Set the layout on the given slide to the layout from the given master.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>SetMasterText</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>SetMasterText</nowiki>|Parameters= | ||
− | {{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki> | + | {{CGscriptParameters_Template|Type=string|Name=<nowiki>mastername</nowiki>|Description=<nowiki>Name of the masterslide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>layoutNameOrType</nowiki>|Description=<nowiki>Layout from the master slide.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of text box.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>parameters</nowiki>|Description=<nowiki>Parameters for the text box.</nowiki>}} |
|Description=<nowiki>Get the number of parameters needed to format the fields in the text box with the given name. Return resulting plain text value.</nowiki>}} | |Description=<nowiki>Get the number of parameters needed to format the fields in the text box with the given name. Return resulting plain text value.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetTable</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetTable</nowiki>|Parameters= |
Revision as of 05:10, 10 May 2016
PptFile
Manipulate PPT files.
Constructors
- () - Create new presentation.
- (Attachment attachment "Load from this attachment.") - Load existing presentation.
- (string source "Load from this source.", bool isTemp "Is source a temporary file.") - Load existing presentation.
Methods
- number AddSlide(string mastername "Name of the masterslide.", string layoutNameOrType "Layout name or type from the master slide.") - Add a new blank slide based on the given master slide.
- Empty Clear() - Remove all slides. Keep all master slides.
- number CloneSlide(PptFile source "Source of slide.", number idx "Index of slide in the source.", bool allowCloneMissingLayout "Copy master slide from source or throw exception.") - Clone a slide from another presentation.
- number CloneSlide(PptFile source "Source of slide.", string name "Name of the slide in the source.", bool allowCloneMissingLayout "Copy master slide from source or throw exception.") - Clone a slide from another presentation.
- string CurrentLayoutType(number idx "Index of slide.") - Get the current layout type.
- string CurrentMasterName(number idx "Index of slide.") - Get the current master.
- array GetAllDiagrams(number idx "Index of slide.") - Return a list of diagram names that can be used in SetDiagram and other diagram functions.
- array GetAllMasterTextBoxes(string mastername "Name of the masterslide.", string layoutNameOrType "Layout from the master slide.") - Return a list of text box names that can be used in SetText for the given slide.
- array GetAllTables(number idx "Index of slide.") - Return a list of table names that can be used in SetDiagram and other diagram functions.
- array GetAllTextBoxes(number idx "Index of slide.") - Return a list of text box names that can be used in SetText for the given slide.
- array GetLayoutTypesFromMaster(string name "Name of master.") - Get a list of all the layout types that belongs to a given master slide.
- array GetMasterNames() - Get a list of all the master slide names. The first is also the primary.
- number GetMasterSlideIdxByName(string name "Name of slide to find.") - Find a slide based on the name. Return -1 if not found.
- number GetMasterTextFields(string mastername "Name of the masterslide.", string layoutNameOrType "Layout from the master slide.", string name "Name of text box.") - Get the number of parameters needed to format the fields in the text box with the given name.
- number GetSlideIdxByName(string name "Name of slide to find.") - Find a slide based on the name. Return -1 if not found.
- number GetTextFields(number idx "Index of slide.", string name "Name of text box.") - Get the number of parameters needed to format the fields in the text box with the given name.
- string Name(number idx "Index of slide.") - Get the name of the given slide.
- number NumberOfSlides() - Get the number of slides.
- Empty RemoveSlide(number idx "Index of slide to remove.") - Remove the given slide. All indexes of following slides are adjusted.
- Empty RenderSlideAsPng(number idx "Index of slide to render.", string dest "Save to this file.", bool isTemp "Is destination a temporary file.") - Render a slide as png image.
- string RenderSlideAsSvg(number idx "Index of slide to render.") - Render a slide as svg image.
- Empty SaveAllAsPptx(string dest "Save to this file.", bool isTemp "Is destination a temporary file.") - Save presentation.
- Empty SetDiagram(number idx "Index of slide.", string name "Name of diagram.", number diagramIndex "Data for the table.", string chartTitle "Title of the chart.") - Set the values of the diagram with the given name on the given slide to the values generated by the diagram returned by createCrossDiagram or createFixedCrossTable.
- Empty SetDiagramData(number idx "Index of slide.", string name "Name of diagram.", array data "Data for the table. E.g. {{'','Series 1'}, {'Category 1', 123.45}}", string chartTitle "Title of the chart.") - Set the values of the diagram with the given name on the given slide to the values given.
- Empty SetMasterAndLayout(number idx "Index of slide.", string mastername "Name of the masterslide.", string layoutNameOrType "Layout from the master slide.") - Set the layout on the given slide to the layout from the given master.
- string SetMasterText(string mastername "Name of the masterslide.", string layoutNameOrType "Layout from the master slide.", string name "Name of text box.", array parameters "Parameters for the text box.") - Get the number of parameters needed to format the fields in the text box with the given name. Return resulting plain text value.
- Empty SetTable(number idx "Index of slide.", string name "Name of diagram.", number diagramIndex "Data for the table.", bool keepTableWidth "If true, the columnsare split into minor cols. This will keep the width of the table.
If false the columns are cloned, which will keep the size of cols, but table may then exceed the slide width.", bool keepTableHeight "If true, the rows are split into minor rows. This will keep the height of the table.
If false the last row is cloned, which will keep the size of rows, but table may then exceed the slide height.") - Set the values of the table with the given name on the given slide to the values generated by the diagram returned by createCrossDiagram or createFixedCrossTable.
- Empty SetTableData(number idx "Index of slide.", string name "Name of table.", array data "Data for the table. E.g. {{'','Series 1'}, {'Category 1', 123.45}}.", bool keepTableWidth "If true, the last col is split into minor cols. This will keep the width of the table.
If false the last col is cloned, which will keep the size of cols, but table may then exceed the slide width.", bool keepTableHeight "If true, the last row is split into minor rows. This will keep the height of the table.
If false the last row is cloned, which will keep the size of rows, but table may then exceed the slide height.") - Set the values of the table with the given name on the given slide to the values given.
- string SetText(number idx "Index of slide.", string name "Name of text box.", array parameters "Parameters for the text box.") - Get the number of parameters needed to format the fields in the text box with the given name. Return resulting plain text value.
- string ToString() - The string representation of the object.
Properties
- string ObjectTypeName { get; } - The name of the type of object.
- TypeInformation TypeInformation { get; } - Get information about this class.