Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

VisioShapeDataSchema

OfficeIMO.Visio

Namespace
OfficeIMO.Visio
Assembly
OfficeIMO.Visio
Source revision
e163ccb36643 with working tree changes
Modifiers
sealed

Reusable Shape Data schema for applying consistent Visio Prop rows to shapes and connectors.

Inheritance

  • object
  • VisioShapeDataSchema

Usage

Explore 5 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 2

Constructors

public VisioShapeDataSchema() #

Methods

public VisioShapeDataSchema Add(VisioShapeDataField field) #

Adds a preconfigured field to the schema.

Parameters

field OfficeIMO.Visio.VisioShapeDataField required
Field to add.
ApplyTo 3 overloads
public VisioShape ApplyTo(VisioShape shape, bool overwriteValues = false) #

Applies the schema to a shape.

Parameters

shape OfficeIMO.Visio.VisioShape required
Shape to update.
overwriteValues bool = false optional
Whether schema defaults should replace existing values.

Returns

VisioShape
public VisioConnector ApplyTo(VisioConnector connector, bool overwriteValues = false) #

Applies the schema to a connector.

Parameters

connector OfficeIMO.Visio.VisioConnector required
Connector to update.
overwriteValues bool = false optional
Whether schema defaults should replace existing values.
public IReadOnlyList<VisioShape> ApplyTo(IEnumerable<VisioShape> shapes, bool overwriteValues = false) #

Applies the schema to a set of shapes.

Parameters

shapes System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioShape> required
Shapes to update.
overwriteValues bool = false optional
Whether schema defaults should replace existing values.

Returns

IReadOnlyList<VisioShape>
public IReadOnlyList<VisioConnector> ApplyToConnectors(IEnumerable<VisioConnector> connectors, bool overwriteValues = false) #

Applies the schema to a set of connectors.

Parameters

connectors System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioConnector> required
Connectors to update.
overwriteValues bool = false optional
Whether schema defaults should replace existing values.

Returns

IReadOnlyList<VisioConnector>
public static VisioShapeDataSchema Create() #

Creates an empty Shape Data schema.

public VisioShapeDataSchema Field(string name, string? label = null, VisioShapeDataType? type = null, string? defaultValue = null, string? prompt = null, string? format = null, string? sortKey = null, bool required = false, bool? invisible = null, bool? verify = null, bool? dataLinked = null, IEnumerable<string>? allowedValues = null) #

Adds a field to the schema.

Parameters

name string required
Shape Data row name.
label string? = null optional
Optional label shown in Visio's Shape Data window.
type OfficeIMO.Visio.VisioShapeDataType? = null optional
Optional Shape Data type.
defaultValue string? = null optional
Default value used when applying the schema to missing or overwritten fields.
prompt string? = null optional
Optional help prompt.
format string? = null optional
Optional format picture or list values.
sortKey string? = null optional
Optional sort key used by Visio's Shape Data window.
required bool = false optional
Whether validation should require a non-empty value.
invisible bool? = null optional
Whether the row is hidden in Visio's Shape Data window.
verify bool? = null optional
Whether Visio should ask for the value when the shape is created, copied, or duplicated.
dataLinked bool? = null optional
Whether this row is linked to an external data recordset.
allowedValues System.Collections.Generic.IEnumerable<string>? = null optional
Optional allowed value list used by validation and list formats.
Validate 2 overloads
public IReadOnlyList<VisioShapeDataSchemaIssue> Validate(VisioShape shape) #

Validates a shape against the schema.

Parameters

shape OfficeIMO.Visio.VisioShape required
Shape to validate.

Returns

IReadOnlyList<VisioShapeDataSchemaIssue>
public IReadOnlyList<VisioShapeDataSchemaIssue> Validate(VisioConnector connector) #

Validates a connector against the schema.

Parameters

connector OfficeIMO.Visio.VisioConnector required
Connector to validate.

Returns

IReadOnlyList<VisioShapeDataSchemaIssue>

Properties

public IReadOnlyList<VisioShapeDataField> Fields { get; } #

Fields included in the schema.