編輯

共用方式為


DiagramNode Interface

Definition

Represents a node in a diagram.

public interface class DiagramNode : Microsoft::Office::Core::_IMsoDispObj
[System.Runtime.InteropServices.Guid("000C0370-0000-0000-C000-000000000046")]
public interface DiagramNode : Microsoft.Office.Core._IMsoDispObj
Public Interface DiagramNode
Implements _IMsoDispObj
Attributes
Implements

Remarks

Use the AddNode(MsoRelativeNodePosition, MsoDiagramNodeType) method to add a node to a diagram or to a diagram node.

Use the Delete() method to remove a node from a diagram or diagram node.

To return a DiagramNode object, use one of the following:

A diagram node can terminate, or it can contain other child diagrams, child diagram nodes, or child shapes. Refer to these with the following:

  • To refer to a child diagram, use the Diagram property.
  • To refer to an individual child diagram node, use the AddNode, CloneNode, NextNode or PrevNode methods or the Root property.
  • To refer to a collection of child diagram nodes, use the Children property.
  • To refer to a shape, use the Shape or TextShape properties.

Properties

Application

Returns an Application object that represents the Microsoft Excel application.

Children

Returns a DiagramNodeChildren object, representing the collection of child nodes of a particular node.

Creator

Returns a 32-bit integer that indicates the application in which this object was created.

Diagram

Returns a Diagram object representing a diagram.

Layout

Returns or sets a constant to indicate the formatting of the child nodes of an organization chart.

Parent

Returns the parent object for the specified object.

Root

Returns the root DiagramNode object which the root diagram node belongs.

Shape

Returns a Shape object that represents the shape attached to the specified diagram node

TextShape

Returns a Shape object representing the shape of the text box associated with a diagram node.

Methods

AddNode(MsoRelativeNodePosition, MsoDiagramNodeType)

Creates a diagram node. Returns a DiagramNode object that represents the new node.

CloneNode(Boolean, DiagramNode, MsoRelativeNodePosition)

Clones a diagram node. Returns a DiagramNode object representing the cloned node.

Delete()

Deletes the object.

MoveNode(DiagramNode, MsoRelativeNodePosition)

Moves a diagram node and any of its child nodes within a diagram.

NextNode()

Selects the next diagram node in a series of nodes. Returns a DiagramNode object representing the newly-selected node.

PrevNode()

Returns a DiagramNode object that represents the previous diagram node in a collection of diagram nodes.

ReplaceNode(DiagramNode)

Replaces a target diagram node with the source diagram node.

SwapNode(DiagramNode, Boolean)

Swaps the source diagram node with a target diagram node.

TransferChildren(DiagramNode)

Returns a Shape object representing the shape of the text box associated with a diagram node.

Applies to