API Reference
Class
VisioShapeDataSchema
Reusable Shape Data schema for applying consistent Visio Prop rows to shapes and connectors.
Inheritance
- Object
- VisioShapeDataSchema
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method VisioShapeDataSchema.Add
- Method VisioShapeDataSchema.Create
- Method VisioShapeDataSchema.Field
Accepted by parameters
Constructors
public VisioShapeDataSchema() #Methods
public VisioShapeDataSchema Add(VisioShapeDataField field) #Returns:
VisioShapeDataSchemaAdds a preconfigured field to the schema.
Parameters
- field OfficeIMO.Visio.VisioShapeDataField
- Field to add.
ApplyTo 3 overloads
public IReadOnlyList<VisioShape> ApplyTo(IEnumerable<VisioShape> shapes, Boolean overwriteValues = false) #Returns:
IReadOnlyList<VisioShape>Applies the schema to a shape.
Parameters
- shape OfficeIMO.Visio.VisioShape
- Shape to update.
- overwriteValues System.Boolean = false
- Whether schema defaults should replace existing values.
ApplyTo(OfficeIMO.Visio.VisioConnector connector, System.Boolean overwriteValues) #Applies the schema to a connector.
Parameters
- connector OfficeIMO.Visio.VisioConnector
- Connector to update.
- overwriteValues System.Boolean
- Whether schema defaults should replace existing values.
ApplyTo(System.Collections.Generic.IEnumerable{OfficeIMO.Visio.VisioShape} shapes, System.Boolean overwriteValues) #Applies the schema to a set of shapes.
Parameters
- shapes System.Collections.Generic.IEnumerable{OfficeIMO.Visio.VisioShape}
- Shapes to update.
- overwriteValues System.Boolean
- Whether schema defaults should replace existing values.
public IReadOnlyList<VisioConnector> ApplyToConnectors(IEnumerable<VisioConnector> connectors, Boolean overwriteValues = false) #Returns:
IReadOnlyList<VisioConnector>Applies the schema to a set of connectors.
Parameters
- connectors System.Collections.Generic.IEnumerable{OfficeIMO.Visio.VisioConnector}
- Connectors to update.
- overwriteValues System.Boolean = false
- Whether schema defaults should replace existing values.
public static VisioShapeDataSchema Create() #Returns:
VisioShapeDataSchemaCreates an empty Shape Data schema.
public VisioShapeDataSchema Field(String name, String label = null, Nullable<VisioShapeDataType> type = null, String defaultValue = null, String prompt = null, String format = null, String sortKey = null, Boolean required = false, Nullable<Boolean> invisible = null, Nullable<Boolean> verify = null, Nullable<Boolean> dataLinked = null, IEnumerable<String> allowedValues = null) #Returns:
VisioShapeDataSchemaAdds a field to the schema.
Parameters
- name System.String
- Shape Data row name.
- label System.String = null
- Optional label shown in Visio's Shape Data window.
- type System.Nullable{OfficeIMO.Visio.VisioShapeDataType} = null
- Optional Shape Data type.
- defaultValue System.String = null
- Default value used when applying the schema to missing or overwritten fields.
- prompt System.String = null
- Optional help prompt.
- format System.String = null
- Optional format picture or list values.
- sortKey System.String = null
- Optional sort key used by Visio's Shape Data window.
- required System.Boolean = false
- Whether validation should require a non-empty value.
- invisible System.Nullable{System.Boolean} = null
- Whether the row is hidden in Visio's Shape Data window.
- verify System.Nullable{System.Boolean} = null
- Whether Visio should ask for the value when the shape is created, copied, or duplicated.
- dataLinked System.Nullable{System.Boolean} = null
- Whether this row is linked to an external data recordset.
- allowedValues System.Collections.Generic.IEnumerable{System.String} = null
- Optional allowed value list used by validation and list formats.
Validate 2 overloads
public IReadOnlyList<VisioShapeDataSchemaIssue> Validate(VisioConnector connector) #Returns:
IReadOnlyList<VisioShapeDataSchemaIssue>Validates a shape against the schema.
Parameters
- shape OfficeIMO.Visio.VisioShape
- Shape to validate.
Validate(OfficeIMO.Visio.VisioConnector connector) #Validates a connector against the schema.
Parameters
- connector OfficeIMO.Visio.VisioConnector
- Connector to validate.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object
Properties
public IReadOnlyList<VisioShapeDataField> Fields { get; } #Fields included in the schema.