API Reference
VisioShape
Represents a shape on a Visio page.
Inheritance
- Object
- VisioShape
Constructors
public VisioShape(String id) #Initializes a new instance of the VisioShape class with the specified identifier.
Parameters
- id System.String
- Identifier of the shape.
public VisioShape(String id, Double pinX, Double pinY, Double width, Double height, String text) #Initializes a new instance of the VisioShape class.
Parameters
- id System.String
- Identifier of the shape.
- pinX System.Double
- X coordinate of the pin.
- pinY System.Double
- Y coordinate of the pin.
- width System.Double
- Width of the shape.
- height System.Double
- Height of the shape.
- text System.String
- Text contained within the shape.
Methods
EnsureSideConnectionPoints() #Ensures the shape has four side connection points (Left, Right, Bottom, Top). If they already exist (>=4), nothing is added. Internal: users should not call this; side points are added automatically by the connector API when explicit sides are requested.
public VisioShape FindDescendantById(String id) #VisioShapeRecursively searches the shape hierarchy for a shape with the provided identifier.
Parameters
- id System.String
- Identifier to locate.
Returns
The matching shape when found; otherwise null.
public ValueTuple<Double, Double> GetAbsolutePoint(Double x, Double y) #ValueTuple<Double, Double>Transforms a point from the shape's local coordinate system to the page coordinate system.
Parameters
- x System.Double
- X coordinate of the point relative to the shape's local coordinate system.
- y System.Double
- Y coordinate of the point relative to the shape's local coordinate system.
Returns
The point's absolute coordinates on the page.
public ValueTuple<Double, Double, Double, Double> GetBounds() #ValueTuple<Double, Double, Double, Double>Computes the absolute bounds of the shape on the page.
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
PersistedId #Identifier stored in the package when different from Id.
public String NameU { get; set; } #Gets or sets the universal name of the shape.
public String Type { get; set; } #Gets or sets the Visio type of the shape (for example "Group").
public VisioMaster Master { get; set; } #Gets or sets the master associated with the shape.
public String MasterShapeId { get; set; } #Gets the identifier of the referenced master shape when Master is defined.
public VisioShape MasterShape { get; set; } #Gets the master shape instance referenced by MasterShapeId, if any.
public String MasterNameU { get; } #Gets the universal name of the master.
public Double PinX { get; set; } #Gets or sets the X coordinate of the pin.
public Double PinY { get; set; } #Gets or sets the Y coordinate of the pin.
public Double Width { get; set; } #Gets or sets the width of the shape.
public Double Height { get; set; } #Gets or sets the height of the shape.
public Double LineWeight { get; set; } #Gets or sets the line weight of the shape.
public Double LocPinX { get; set; } #Gets or sets the X coordinate of the local pin.
public Double LocPinY { get; set; } #Gets or sets the Y coordinate of the local pin.
public Double Angle { get; set; } #Gets or sets the rotation angle of the shape in radians.
public String Text { get; set; } #Gets or sets the text contained in the shape.
public Color LineColor { get; set; } #Line (border) color of the shape.
public Int32 LinePattern { get; set; } #Line pattern (0=None, 1=Solid, 2=Dashed, etc.).
public Int32 FillPattern { get; set; } #Fill pattern (0=None, 1=Solid, etc.).
public VisioShape Parent { get; set; } #Parent shape when part of a group hierarchy.
public IList<VisioShape> Children { get; } #Child shapes when this shape represents a group.
public IList<VisioConnectionPoint> ConnectionPoints { get; } #Connection points associated with the shape.
PreservedGeometrySections #Geometry sections captured from a loaded package so custom shape outlines can be preserved on save.
public Dictionary<String, String> Data { get; } #Arbitrary data associated with the shape.
Fields
DefaultLineWeight #Default line weight used when Visio does not specify a value.