DataGraphicDelete 方法 (Visio)Master.DataGraphicDelete method (Visio)

會從檔的主控形狀集合中刪除類型visTypeDataGraphic圖形。Deletes the Master of type visTypeDataGraphic from the Masters collection of the document.

注意

This Visio object or member is available only to licensed users of Visio Professional 2013.This Visio object or member is available only to licensed users of Visio Professional 2013.

語法Syntax

expressionexpression. DataGraphicDelete

_運算式_會傳回**Master** 物件的運算式。expression An expression that returns a Master object.

傳回值Return value

Nothing

註解Remarks

DataGraphicDelete方法會刪除資料圖形主圖形, 並從繪圖中的所有已套用的圖形中移除資料圖形。The DataGraphicDelete method deletes the data graphic master and removes the data graphic from all shapes in the drawing to which it has been applied. Master.Delete 方法只會刪除資料主圖形,而讓根據此主圖形且已經套用到繪圖中圖形的資料圖形保持不變。The Master.Delete method deletes only the data graphic master, leaving data graphics based on the master and already applied to shapes in the drawing intact.

呼叫DataGraphicDelete方法相當於以滑鼠右鍵按一下 Microsoft Visio 使用者介面中 [資料圖形] 工作窗格中的資料圖形, 然後按一下快顯功能表上的 [刪除]。Calling the DataGraphicDelete method is the equivalent of right-clicking a data graphic in the Data Graphics task pane in the Microsoft Visio user interface and then clicking Delete on the context menu.

範例Example

下列的 Microsoft Visual Basic for Applications (VBA) 宏會示範如何使用DataGraphicDelete , 從使用中檔的主控形狀集合中刪除類型visTypeDataGraphic圖形。This Microsoft Visual Basic for Applications (VBA) macro shows how to use the DataGraphicDelete to delete a Master of type visTypeDataGraphic from the Masters collection of the active document. 在此範例中刪除的資料圖形主圖形會命名為 "資料圖形"。The data graphic master deleted in this example is named "Data Graphic." 您可以在 [資料圖形] 工作窗格中, 將滑鼠停留在資料圖形的縮圖上, 以判斷資料圖形主圖形的名稱。You can determine the name of a data graphic master by pausing your mouse over a data graphic thumbnail in the Data Graphics task pane.

Public Sub DataGraphicDelete_example() 
 
    Dim vsoMaster As Visio.Master 
   
    Set vsoMaster = ActiveDocument.Masters("Data Graphic")    
    vsoMaster.DataGraphicDelete 
 
End Sub

支援和意見反應Support and feedback

有關於 Office VBA 或這份文件的問題或意見反應嗎?Have questions or feedback about Office VBA or this documentation? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.