Item Info Routines
The following routines provide the ability to obtain various information about each item in an object. These routines are useful if you want to deal with objects in a generic way and need to know how to classify each item.
OT GetAllProperties version 1 modified version 2.0
OT GetAllProperties(inObject; outNames {; outTypes {; outItemSizes {; outDataSizes}}})
Parameter Type Description
inObject Longint A handle to an object
→
outName String/Text array Receives item names
←
outTypes Longint array Receives item types
←
outItemSizes Longint array Receives item sizes in bytes
←
outDataSizes Longint array Receives item data sizes in bytes
←
Discussion
OT GetAllProperties returns information about all items in inObject into the given arrays. The arrays will contain one element for each item in object.
If the object is not a valid object handle or if the arrays are not of the type specified, an error is generated, the arrays are cleared and OK is set to zero.
The sizes in outItemSizes represent the total size of the item within the object, including the item’s data, tag and other internal information. The sizes in outDataSizes represent the size of the item’s data.
Note As of ObjectTools 2.0, item names are no longer returned in the order they were put into the object, but are returned in an indeterminate order, so you may want to sort the arrays after making this call.
See Also
OT GetItemProperties version 1 modified version 2.0
OT GetItemProperties(inObject; inIndex; outName {; outType {; outItemSize {; outDataSize}}})
Parameter Type Description
inObject Longint A handle to an object
→
inIndex Longint An index from 1 to the number of
→ items in the object outName String Receives the item’s name
←
outType Longint Receives the item’s type
←
outItemSize Longint Receives the item’s size
←
outDataSize Longint Receives the item data’s size
←
Discussion
OT GetItemProperties returns the properties of a given item. Items are numbered according to the number of items in an object, starting with 1. In conjunction with OT ItemCount, this allows you to iterate over all of the items in the object.
If inObject is not a valid object handle or if the index is out of range, an error is generated, OK is set to zero, and the return variables are left untouched.
Note As of ObjectTools 2.0, it is recommended that you no longer use this command, as the object items are stored in indeterminate order, thus making the item index quite useless. You should use OT GetNamedProperties instead.
See Also
OT GetNamedProperties version 1 modified version 2.0
OT GetNamedProperties(inObject; inTag; outType {; outItemSize {; outDataSize {; outIndex}}}})
Parameter Type Description
inObject Longint A handle to an object
→
inTag String An item tag
→
outType Longint Receives the item’s type
←
outItemSize Longint Receives the item’s size including
- the tag outDataSize Longint Receives the item’s size excluding
- the tag outIndex Longint Receives the item’s index
←
Discussion
OT GetNamedProperties returns the properties of the item identified by the tag inTag.
If inObject is not a valid object handle or if no item in object has the given tag, an error is generated, OK is set to zero, and the return variables are left untouched.
Note As of ObjectTools 2.0, outIndex will always be zero, as it is meaningless.
See Also
OT GetAllProperties , OT GetItemProperties
OT IsEmbedded version 1
OT IsEmbedded(inObject; inTag) Number
→
Parameter Type Description
inObject Longint A handle to an object
→
inTag String Tag of the item to query
→
Function result Number 1 if the given item is an embedded← object, 0 if not
Discussion
OT IsEmbedded tests the item referenced by inTag to see if it is an embedded object.
If inObject is not a valid object handle or if no item in object has the given tag, an error is generated, OK is set to zero, and zero is returned.
If an item with the given tag exists and has the type OT Is Object, 1 is returned.
If an item with the given tag exists and has any other type, zero is returned.
See Also
OT ItemType, OT GetItemProperties, OT GetNamedProperties
OT ItemExists version 1
OT ItemExists(inObject; inTag) Number
→
Parameter Type Description
inObject Longint A handle to an object
→
inTag String Tag of the item to query
→
Function result Number 1 if the given item exists, 0 if not
←
Discussion
OT ItemExists tests for the existence of the given item. inTag may refer to a top level item, an embedded object or an embedded item.
If inObject is not a valid object handle, an error is generated, OK is set to zero, and zero is returned.
If an item with the given tag exists, 1 is returned. Otherwise zero is returned.
OT ItemType version 1
OT ItemType(inObject; inTag) Number
→
Parameter Type Description
inObject Longint A handle to an object
→
inTag String Tag of the item to query
→
Function result Number The type of the item
←
Discussion
OT ItemType returns the type of the item referenced by inTag.
If inObject is not a valid object handle or if no item in object has the given tag, an error is generated, OK is set to zero, and zero is returned.
If an item with the given tag exists, its type is returned.
See Also
OT GetAllProperties , OT GetNamedProperties, OT GetItemProperties

