SlideShare a Scribd company logo
AUTOMATING YOUR
CHARTS
Using VBA or C#
Automation Methods
/// Return true if shape is a MekkoGraphics chart
bool IsMekkoChart(PowerPoint.Shape sh);
/// This function will open the provided Mekko Graphics chart for editing
void EditMekkoChart(PowerPoint.Shape sh);
/// This function will save and close the currently opened Mekko Graphics chart
void SaveAndCloseMekkoChart();
/// This function returns True if the provided Shape is a Mekko Graphics chart
bool IsMekkoChart(PowerPoint.Shape sh);
/// This function will extract the chart data from the currently opened Mekko Graphics chart
string[,] GetOpenedChartData();
/// This function will extract the chart data from the provided Mekko Graphics chart
string[,] GetChartData(PowerPoint.Shape shape);
/// This function will inject the chart data into the currently opened Mekko Graphics chart
void SetOpenedChartData(string [,] data);
/// This function will inject the chart data into the provided Mekko Graphics chart
PowerPoint.Shape SetChartData(PowerPoint.Shape shape, string[,] data);
/// This function will refresh the Excel Link (if any) for the provided Mekko Graphics chart
bool RefreshExcelLink(PowerPoint.Shape shape);
/// This function will Update the provided Mekko Graphics chart
bool RefreshChart(PowerPoint.Shape shape);
/// Replaces entire ChartDataArray
void ReplaceOpenedChartDataArray(string[,] data);
/// Replaces entire ChartDataArray for shape
PowerPoint.Shape ReplaceChartDataArray(PowerPoint.Shape shape, string[,] data);
VBA Sample Code
Switch to Microsoft Visual Basic Editor (Alt+F11) to see more code samples
// VBA
Sub UpdateSelectedChart()
Dim addIn As COMAddIn
Dim MG_utilities As Object
Dim sel As Selection
Dim sh As Shape
Set addIn = Application.COMAddIns("MekkoGraphicsAddin")
Set MG_utilities = addIn.Object
If (MG_utilities Is Not Null) Then
Set sel = ActiveWindow.Selection
If (sel.ShapeRange.Count = 1) Then
Set sh = sel.ShapeRange(1)
If (MG_utilities.IsMekkoChart(sh)) Then
MG_utilities.RefreshChart (sh)
End If
End If
End If
End Sub
C# Interface
public interface IAddInUtilities
{
void EditMekkoChart(PowerPoint.Shape sh);
void OpenTaskPanes(PowerPoint.Shape sh);
void SaveAndCloseMekkoChart();
bool IsMekkoChart(PowerPoint.Shape sh);
string[,] GetOpenedChartData();
string[,] GetChartData(PowerPoint.Shape shape);
/// <summary>
/// Only Replaces corresponding cell values in ChartDataArray if cells and valueas are not empry. Does not change size of ChartDataArray
/// </summary>
void SetOpenedChartData(string[,] data);
/// <summary>
/// Only Replaces corresponding cell values in ChartDataArray if cells and valueas are not empry. Does not change size of ChartDataArray
/// </summary>
PowerPoint.Shape SetChartData(PowerPoint.Shape shape, string[,] data);
/// <summary>
/// Replaces entire ChartDataArray
/// </summary>
/// <param name="shape"></param>
/// <param name="data"></param>
/// <returns></returns>
void ReplaceOpenedChartDataArray(string[,] data);
/// <summary>
/// Replaces entire ChartDataArray
/// </summary>
/// <param name="shape"></param>
/// <param name="data"></param>
/// <returns></returns>
PowerPoint.Shape ReplaceChartDataArray(PowerPoint.Shape shape, string[,] data);
bool RefreshExcelLink(PowerPoint.Shape shape);
bool RefreshChart(PowerPoint.Shape shape);
bool ConvertChart(PowerPoint.Shape shape);
}
C# Sample Code
// C#
// First set a reference to MekkoAddin10.dll located in the Mekko Graphics installation folder
public void UpdateSelectedChart(Office.IRibbonControl control)
{
object addInName = "MekkoGraphicsAddin";
Office.COMAddIn addIn = Globals.ThisAddIn.Application.COMAddIns.Item(ref addInName);
WizardAddin.IAddInUtilities MG_utilities = (WizardAddin.IAddInUtilities)addIn.Object;
if (MG_utilities != null)
{
PowerPoint.DocumentWindow dw = Globals.ThisAddIn.Application.ActiveWindow;
PowerPoint.Selection sel = dw.Selection;
if (sel.ShapeRange.Count == 1)
{
PowerPoint.Shape sh = sel.ShapeRange[1];
if (MG_utilities.IsMekkoChart(sh))
MG_utilities.RefreshChart(sh);
}
}
}

More Related Content

Similar to Automating Your Charts

TeleVox
TeleVoxTeleVox
TeleVox
deathwing
 
Ac_2007_397_Use_of_Spreadsheets_with_Sca.pdf
Ac_2007_397_Use_of_Spreadsheets_with_Sca.pdfAc_2007_397_Use_of_Spreadsheets_with_Sca.pdf
Ac_2007_397_Use_of_Spreadsheets_with_Sca.pdf
Spyros Ioakimidis
 
Useful Tools for Making Video Games - XNA (2008)
Useful Tools for Making Video Games - XNA (2008)Useful Tools for Making Video Games - XNA (2008)
Useful Tools for Making Video Games - XNA (2008)
Korhan Bircan
 
Building user interface with react
Building user interface with reactBuilding user interface with react
Building user interface with react
Amit Thakkar
 
Maps - Part 3 - Transcript.pdf
Maps - Part 3 - Transcript.pdfMaps - Part 3 - Transcript.pdf
Maps - Part 3 - Transcript.pdf
ShaiAlmog1
 
Jfreechart tutorial
Jfreechart tutorialJfreechart tutorial
Jfreechart tutorial
Danilo Tabares Jimenez
 
How to build to do app using vue composition api and vuex 4 with typescript
How to build to do app using vue composition api and vuex 4 with typescriptHow to build to do app using vue composition api and vuex 4 with typescript
How to build to do app using vue composition api and vuex 4 with typescript
Katy Slemon
 
Using Mathematica for computational learning
Using Mathematica for computational learningUsing Mathematica for computational learning
Using Mathematica for computational learningMiles Ford
 
Funções DAX.pdf
Funções DAX.pdfFunções DAX.pdf
Funções DAX.pdf
Joao Vaz
 
JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"
GeeksLab Odessa
 
Matlab Basic Tutorial
Matlab Basic TutorialMatlab Basic Tutorial
Matlab Basic Tutorial
Muhammad Rizwan
 
Spreadsheet Analytical Tools
Spreadsheet Analytical ToolsSpreadsheet Analytical Tools
Spreadsheet Analytical Tools
Joselito Perez
 
Mathcad
MathcadMathcad
Mathcad
gaadi221
 
Comilla University
Comilla University Comilla University
C# Starter L06-Delegates, Event Handling and Extension Methods
C# Starter L06-Delegates, Event Handling and Extension MethodsC# Starter L06-Delegates, Event Handling and Extension Methods
C# Starter L06-Delegates, Event Handling and Extension Methods
Mohammad Shaker
 
Oleksandr Tolstykh
Oleksandr TolstykhOleksandr Tolstykh
Oleksandr Tolstykh
CodeFest
 
WD programs descriptions.docx
WD programs descriptions.docxWD programs descriptions.docx
WD programs descriptions.docx
anjani pavan kumar
 
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
Sébastien Levert
 

Similar to Automating Your Charts (20)

TeleVox
TeleVoxTeleVox
TeleVox
 
Ac_2007_397_Use_of_Spreadsheets_with_Sca.pdf
Ac_2007_397_Use_of_Spreadsheets_with_Sca.pdfAc_2007_397_Use_of_Spreadsheets_with_Sca.pdf
Ac_2007_397_Use_of_Spreadsheets_with_Sca.pdf
 
Useful Tools for Making Video Games - XNA (2008)
Useful Tools for Making Video Games - XNA (2008)Useful Tools for Making Video Games - XNA (2008)
Useful Tools for Making Video Games - XNA (2008)
 
Building user interface with react
Building user interface with reactBuilding user interface with react
Building user interface with react
 
Maps - Part 3 - Transcript.pdf
Maps - Part 3 - Transcript.pdfMaps - Part 3 - Transcript.pdf
Maps - Part 3 - Transcript.pdf
 
Jfreechart tutorial
Jfreechart tutorialJfreechart tutorial
Jfreechart tutorial
 
How to build to do app using vue composition api and vuex 4 with typescript
How to build to do app using vue composition api and vuex 4 with typescriptHow to build to do app using vue composition api and vuex 4 with typescript
How to build to do app using vue composition api and vuex 4 with typescript
 
Using Mathematica for computational learning
Using Mathematica for computational learningUsing Mathematica for computational learning
Using Mathematica for computational learning
 
Funções DAX.pdf
Funções DAX.pdfFunções DAX.pdf
Funções DAX.pdf
 
Programming with Mathcad Prime
Programming with Mathcad PrimeProgramming with Mathcad Prime
Programming with Mathcad Prime
 
JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"
 
Matlab Basic Tutorial
Matlab Basic TutorialMatlab Basic Tutorial
Matlab Basic Tutorial
 
Spreadsheet Analytical Tools
Spreadsheet Analytical ToolsSpreadsheet Analytical Tools
Spreadsheet Analytical Tools
 
Mathcad
MathcadMathcad
Mathcad
 
Comilla University
Comilla University Comilla University
Comilla University
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design Patterns
 
C# Starter L06-Delegates, Event Handling and Extension Methods
C# Starter L06-Delegates, Event Handling and Extension MethodsC# Starter L06-Delegates, Event Handling and Extension Methods
C# Starter L06-Delegates, Event Handling and Extension Methods
 
Oleksandr Tolstykh
Oleksandr TolstykhOleksandr Tolstykh
Oleksandr Tolstykh
 
WD programs descriptions.docx
WD programs descriptions.docxWD programs descriptions.docx
WD programs descriptions.docx
 
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
 

More from Mekko Graphics

US Covid-19 Deaths in Long-Term Care
US Covid-19 Deaths in Long-Term CareUS Covid-19 Deaths in Long-Term Care
US Covid-19 Deaths in Long-Term Care
Mekko Graphics
 
COVID-19 Deaths
COVID-19 DeathsCOVID-19 Deaths
COVID-19 Deaths
Mekko Graphics
 
COVID-19 Cases by Country
COVID-19 Cases by CountryCOVID-19 Cases by Country
COVID-19 Cases by Country
Mekko Graphics
 
CARES Act $2T Stimulus Bill
CARES Act $2T Stimulus BillCARES Act $2T Stimulus Bill
CARES Act $2T Stimulus Bill
Mekko Graphics
 
Global Entertainment Market
Global Entertainment MarketGlobal Entertainment Market
Global Entertainment Market
Mekko Graphics
 
Child Malnutrition Worldwide
Child Malnutrition WorldwideChild Malnutrition Worldwide
Child Malnutrition Worldwide
Mekko Graphics
 
Vehicle Buyers by Age
Vehicle Buyers by AgeVehicle Buyers by Age
Vehicle Buyers by Age
Mekko Graphics
 
Billionaires and Their Wealth
Billionaires and Their WealthBillionaires and Their Wealth
Billionaires and Their Wealth
Mekko Graphics
 
Ask the Expert webinar February 2019
Ask the Expert webinar February 2019Ask the Expert webinar February 2019
Ask the Expert webinar February 2019
Mekko Graphics
 
Start-Up Funding
Start-Up FundingStart-Up Funding
Start-Up Funding
Mekko Graphics
 
Profile of America's Homeless
Profile of America's HomelessProfile of America's Homeless
Profile of America's Homeless
Mekko Graphics
 
Ten Worst US Traffic Corridors
Ten Worst US Traffic CorridorsTen Worst US Traffic Corridors
Ten Worst US Traffic Corridors
Mekko Graphics
 
Netflix Q1 2018 Results
Netflix Q1 2018 ResultsNetflix Q1 2018 Results
Netflix Q1 2018 Results
Mekko Graphics
 
Smartphone Sales Growth
Smartphone Sales GrowthSmartphone Sales Growth
Smartphone Sales Growth
Mekko Graphics
 
Analyzing Amazon
Analyzing AmazonAnalyzing Amazon
Analyzing Amazon
Mekko Graphics
 
Amazon's Record Revenue Quarter
Amazon's Record Revenue QuarterAmazon's Record Revenue Quarter
Amazon's Record Revenue Quarter
Mekko Graphics
 
Mastering Chart Selection
Mastering Chart SelectionMastering Chart Selection
Mastering Chart Selection
Mekko Graphics
 
June 2017 Webinar: Tips and Tricks
June 2017 Webinar: Tips and TricksJune 2017 Webinar: Tips and Tricks
June 2017 Webinar: Tips and Tricks
Mekko Graphics
 
Choosing the Right Chart: Strategies for Effectively Presenting Data
Choosing the Right Chart: Strategies for Effectively Presenting DataChoosing the Right Chart: Strategies for Effectively Presenting Data
Choosing the Right Chart: Strategies for Effectively Presenting Data
Mekko Graphics
 
What's New in Mekko Graphics 8 for Windows
What's New in Mekko Graphics 8 for WindowsWhat's New in Mekko Graphics 8 for Windows
What's New in Mekko Graphics 8 for Windows
Mekko Graphics
 

More from Mekko Graphics (20)

US Covid-19 Deaths in Long-Term Care
US Covid-19 Deaths in Long-Term CareUS Covid-19 Deaths in Long-Term Care
US Covid-19 Deaths in Long-Term Care
 
COVID-19 Deaths
COVID-19 DeathsCOVID-19 Deaths
COVID-19 Deaths
 
COVID-19 Cases by Country
COVID-19 Cases by CountryCOVID-19 Cases by Country
COVID-19 Cases by Country
 
CARES Act $2T Stimulus Bill
CARES Act $2T Stimulus BillCARES Act $2T Stimulus Bill
CARES Act $2T Stimulus Bill
 
Global Entertainment Market
Global Entertainment MarketGlobal Entertainment Market
Global Entertainment Market
 
Child Malnutrition Worldwide
Child Malnutrition WorldwideChild Malnutrition Worldwide
Child Malnutrition Worldwide
 
Vehicle Buyers by Age
Vehicle Buyers by AgeVehicle Buyers by Age
Vehicle Buyers by Age
 
Billionaires and Their Wealth
Billionaires and Their WealthBillionaires and Their Wealth
Billionaires and Their Wealth
 
Ask the Expert webinar February 2019
Ask the Expert webinar February 2019Ask the Expert webinar February 2019
Ask the Expert webinar February 2019
 
Start-Up Funding
Start-Up FundingStart-Up Funding
Start-Up Funding
 
Profile of America's Homeless
Profile of America's HomelessProfile of America's Homeless
Profile of America's Homeless
 
Ten Worst US Traffic Corridors
Ten Worst US Traffic CorridorsTen Worst US Traffic Corridors
Ten Worst US Traffic Corridors
 
Netflix Q1 2018 Results
Netflix Q1 2018 ResultsNetflix Q1 2018 Results
Netflix Q1 2018 Results
 
Smartphone Sales Growth
Smartphone Sales GrowthSmartphone Sales Growth
Smartphone Sales Growth
 
Analyzing Amazon
Analyzing AmazonAnalyzing Amazon
Analyzing Amazon
 
Amazon's Record Revenue Quarter
Amazon's Record Revenue QuarterAmazon's Record Revenue Quarter
Amazon's Record Revenue Quarter
 
Mastering Chart Selection
Mastering Chart SelectionMastering Chart Selection
Mastering Chart Selection
 
June 2017 Webinar: Tips and Tricks
June 2017 Webinar: Tips and TricksJune 2017 Webinar: Tips and Tricks
June 2017 Webinar: Tips and Tricks
 
Choosing the Right Chart: Strategies for Effectively Presenting Data
Choosing the Right Chart: Strategies for Effectively Presenting DataChoosing the Right Chart: Strategies for Effectively Presenting Data
Choosing the Right Chart: Strategies for Effectively Presenting Data
 
What's New in Mekko Graphics 8 for Windows
What's New in Mekko Graphics 8 for WindowsWhat's New in Mekko Graphics 8 for Windows
What's New in Mekko Graphics 8 for Windows
 

Recently uploaded

一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
ewymefz
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
tapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive data
theahmadsaood
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Boston Institute of Analytics
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
ukgaet
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
Oppotus
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
haila53
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
NABLAS株式会社
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
benishzehra469
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
ocavb
 

Recently uploaded (20)

一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
tapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive data
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 

Automating Your Charts

  • 2. Automation Methods /// Return true if shape is a MekkoGraphics chart bool IsMekkoChart(PowerPoint.Shape sh); /// This function will open the provided Mekko Graphics chart for editing void EditMekkoChart(PowerPoint.Shape sh); /// This function will save and close the currently opened Mekko Graphics chart void SaveAndCloseMekkoChart(); /// This function returns True if the provided Shape is a Mekko Graphics chart bool IsMekkoChart(PowerPoint.Shape sh); /// This function will extract the chart data from the currently opened Mekko Graphics chart string[,] GetOpenedChartData(); /// This function will extract the chart data from the provided Mekko Graphics chart string[,] GetChartData(PowerPoint.Shape shape); /// This function will inject the chart data into the currently opened Mekko Graphics chart void SetOpenedChartData(string [,] data); /// This function will inject the chart data into the provided Mekko Graphics chart PowerPoint.Shape SetChartData(PowerPoint.Shape shape, string[,] data); /// This function will refresh the Excel Link (if any) for the provided Mekko Graphics chart bool RefreshExcelLink(PowerPoint.Shape shape); /// This function will Update the provided Mekko Graphics chart bool RefreshChart(PowerPoint.Shape shape); /// Replaces entire ChartDataArray void ReplaceOpenedChartDataArray(string[,] data); /// Replaces entire ChartDataArray for shape PowerPoint.Shape ReplaceChartDataArray(PowerPoint.Shape shape, string[,] data);
  • 3. VBA Sample Code Switch to Microsoft Visual Basic Editor (Alt+F11) to see more code samples // VBA Sub UpdateSelectedChart() Dim addIn As COMAddIn Dim MG_utilities As Object Dim sel As Selection Dim sh As Shape Set addIn = Application.COMAddIns("MekkoGraphicsAddin") Set MG_utilities = addIn.Object If (MG_utilities Is Not Null) Then Set sel = ActiveWindow.Selection If (sel.ShapeRange.Count = 1) Then Set sh = sel.ShapeRange(1) If (MG_utilities.IsMekkoChart(sh)) Then MG_utilities.RefreshChart (sh) End If End If End If End Sub
  • 4. C# Interface public interface IAddInUtilities { void EditMekkoChart(PowerPoint.Shape sh); void OpenTaskPanes(PowerPoint.Shape sh); void SaveAndCloseMekkoChart(); bool IsMekkoChart(PowerPoint.Shape sh); string[,] GetOpenedChartData(); string[,] GetChartData(PowerPoint.Shape shape); /// <summary> /// Only Replaces corresponding cell values in ChartDataArray if cells and valueas are not empry. Does not change size of ChartDataArray /// </summary> void SetOpenedChartData(string[,] data); /// <summary> /// Only Replaces corresponding cell values in ChartDataArray if cells and valueas are not empry. Does not change size of ChartDataArray /// </summary> PowerPoint.Shape SetChartData(PowerPoint.Shape shape, string[,] data); /// <summary> /// Replaces entire ChartDataArray /// </summary> /// <param name="shape"></param> /// <param name="data"></param> /// <returns></returns> void ReplaceOpenedChartDataArray(string[,] data); /// <summary> /// Replaces entire ChartDataArray /// </summary> /// <param name="shape"></param> /// <param name="data"></param> /// <returns></returns> PowerPoint.Shape ReplaceChartDataArray(PowerPoint.Shape shape, string[,] data); bool RefreshExcelLink(PowerPoint.Shape shape); bool RefreshChart(PowerPoint.Shape shape); bool ConvertChart(PowerPoint.Shape shape); }
  • 5. C# Sample Code // C# // First set a reference to MekkoAddin10.dll located in the Mekko Graphics installation folder public void UpdateSelectedChart(Office.IRibbonControl control) { object addInName = "MekkoGraphicsAddin"; Office.COMAddIn addIn = Globals.ThisAddIn.Application.COMAddIns.Item(ref addInName); WizardAddin.IAddInUtilities MG_utilities = (WizardAddin.IAddInUtilities)addIn.Object; if (MG_utilities != null) { PowerPoint.DocumentWindow dw = Globals.ThisAddIn.Application.ActiveWindow; PowerPoint.Selection sel = dw.Selection; if (sel.ShapeRange.Count == 1) { PowerPoint.Shape sh = sel.ShapeRange[1]; if (MG_utilities.IsMekkoChart(sh)) MG_utilities.RefreshChart(sh); } } }