Deleteproperty – Kofax DM API User Manual

Page 181

Advertising
background image

DM API M

ETHODS

AND

P

ROPERTIES

161

DeleteProperty

DeleteProperty

Use this method to delete a property from the property list based on its
index (relative) position in the list. DeleteProperty uses a zero-based
index. After an item is deleted from the list, the list repacks itself.

Syntax

PCDPropertyList.DeleteProperty( lngNdx )

Parameter

Returns

Returns an

HRESULT

to receive the result of the call.

S_OK

indicates

success. Languages such as JavaScript, Visual Basic, and VBScript
return this as a function value.

Usage

Indexes in the list are not guaranteed to match the position in which
they were first added to the list. For example, assume you have a

PCDPropertyList

of four items, with index values from 0 to 3. Perhaps

you want to delete the item with index value 1 and update the item with
index value 3. After you delete the first item, the list repacks itself. Now
the item you want to update has an index value of 2, not 3. For this
reason, you should use the

GetPropertyIndex

method to determine the

index item to delete.

Example

See the

Example

in the discussion of the PCDPropertyList object for

sample code that uses the DeleteProperty method.

Related Items

See the

PCDPropertyList

object.

See the following methods:

lngNdx

The index value that identifies the relative position of
the property to delete.

Advertising