Shape.GetCustomPropertiesLinkedToData Method
Visio Automation Reference |
Gets the IDs of the shape-data-item (custom property) rows in the Shape Data section of the shape's ShapeSheet spreadsheet linked to the specified data recordset.
Note |
---|
This Visio object or member is available only to licensed users of Microsoft Office Visio Professional 2007. |
Version Information
Version Added: Visio 2007
Syntax
expression.GetCustomPropertiesLinkedToData(DataRecordsetID, CustomPropertyIndices())
expression An expression that returns a Shape object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
DataRecordsetID | Required | Long | The ID of the data recordset that contains the data the shape is linked to. |
CustomPropertyIndices() | Required | Long | Out parameter. An empty, dimensionless array that the method fills with the row IDs of the shape-data-item (custom property) rows in the shape's ShapeSheet that are linked to data columns in the data recordset. |
Return Value
Nothing
Remarks
Knowing how shapes are linked to data can help prevent conflicts and broken links when you refresh the data in one or more data recordsets.
Note |
---|
In previous versions of Visio, shape data were called custom properties. |
Example
The following Microsoft Visual Basic for Applications (VBA) macro shows how to use the GetCustomPropertiesLinkedToData method to get the IDs of the shape-data-item (custom property) rows linked to a data column in a data recordset.
Before running this macro, add at least one data recordset to the DataRecordsets collection of the document. The macro drops a shape onto the page, links the shape to data in the data recordset most recently added to the collection, and then tests to make sure the linking is successful. If it is, it gets the row IDs of all ShapeSheet rows linked to data prints the IDs of the rows in the Immediate window.
Visual Basic for Applications |
---|
|
See Also