Class ShapeNode (PowerPoint VBA)
The class ShapeNode represents the geometry and the geometry-editing properties of the nodes in a user-defined freeform. To use a ShapeNode class variable it first needs to be instantiated, for example
Dim shpn as ShapeNode
Set shpn = ActiveWindow.RangeFromPoint.Nodes(Index:=1)
EditingType
If the specified node is a vertex, this property returns a value that indicates how changes made to the node affect the two segments connected to the node. If the node is a control point for a curved segment, this property returns the editing type of the adjacent vertex.
This property is read-only. Use the SetEditingType method to set the value of this property. The value of the EditingType property can be one of these MsoEditingType constants.
Dim metEditingType As Office.MsoEditingType
metEditingType = ActivePresentation.Slides(1).Shapes(1).Nodes(1).EditingType
Points
Returns a Variant that represents the position of the specified node as a coordinate pair. Read-only.
Each coordinate is expressed in points. Use the SetPosition method to set the value of this property.
With ActivePresentation.Slides(1).Shapes(3).Nodes
pointsArray = .Item(2).Points
currXvalue = pointsArray(1, 1)
currYvalue = pointsArray(1, 2)
.SetPosition Index:=2, X1:=currXvalue + 200, Y1:=currYvalue + 300
End With
SegmentType
Returns a value that indicates whether the segment associated with the specified node is straight or curved.
This property is read-only. Use the SetSegmentType method to set the value of this property. The value returned by the SegmentType property can be one of these MsoSegmentType constants. The SegmentType property returns msoSegmentCurve if the specified node is a control point for a curved segment.
Dim mstSegmentType As Office.MsoSegmentType
mstSegmentType = ActivePresentation.Slides(1).Shapes(1).Nodes(1).SegmentType