RedefineAttributes

 

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

MVAttribType

required; primary ID

SIDField

MVAttribType

required; secondary ID

Attrib1Field

MVAttribType

required; attribute 1

Attrib2Field

MVAttribType

required; attribute 2

HyperlinkField

MVAttribType

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