The RedefineAttributes method redefines the IDs and attributes for the selected object(s).
Syntax
object.RedefineAttributes( PIDField, SIDField, Attrib1Field, Attrib2Field, HyperlinkField, PIDCol, SIDCol, Attrib1Col, Attrib2Col, HyperlinkCol )
Parameter |
Type |
Description |
PIDField |
required; primary ID |
|
SIDField |
required; secondary ID |
|
Attrib1Field |
required; attribute 1 |
|
Attrib2Field |
required; attribute 2 |
|
HyperlinkField |
required; hyperlink |
|
PIDCol |
Long |
optional; redefines PID from worksheet column; 0 does not use column, 1 = column A, 2 = column B, etc.; default = 0 |
SIDCol |
Long |
optional; redefines SID from worksheet column; 0 does not use column, 1 = column A, 2 = column B, etc.; default = 0 |
Attrib1Col |
Long |
optional; redefines Attribute 1 from worksheet column; 0 does not use column, 1 = column A, 2 = column B, etc.; default = 0 |
Attrib2Col |
Long |
optional; redefines Attribute 2 from worksheet column; 0 does not use column, 1 = column A, 2 = column B, etc.; default = 0 |
HyperlinkCol |
Long |
optional; redefines Hyperlink from worksheet column; 0 does not use column, 1 = column A, 2 = column B, etc.; default = 0 |
Example
This example changes the secondary ID field and the attribute 1 field to the same value as the primary ID field for the selected objects and keeps the PID, attribute 2, and hyperlink fields the unchanged.
Selection.RedefineAttributes(PIDField:= mvAttribTypePID, SIDField:= mvAttribTypePID, _
Attrib1Field:= mvAttribTypePID, Attrib2Field:=mvAttribTypeAttrib2, HyperlinkField:=mvAttribTypeHyperlink)
Used by: Selection collection