Description
The GetProperties
property returns an aqObjIterator
object that lists all the properties of the desired object. Use the HasNext
, Next
and Item
methods of the returned aqObjIterator
object to iterate through the collection of the object’s properties. Each single property is described by an individual aqObjProperty
object.
Declaration
aqObject.GetProperties(SourceObject, ShowHidden)
SourceObject | [in] | Required | Object | |
ShowHidden | [in] | Optional | Boolean | Default value: False |
Result | The aqObjIterator object. |
Applies To
The method is applied to the following object:
Parameters
The method has the following parameters:
SourceObject
The object whose properties you want to retrieve. If the specified object was not found, the GetProperties
method returns an empty value (that is, Nothing
in VBScript, null
in JavaScript, JScript, C++Script and C#Script, None
in Python and nil
in DelphiScript).
ShowHidden
Specifies whether to retrieve hidden properties of the object. Hidden properties are those that are displayed in the Object Browser but are not listed in the Code Completion window.
Result Value
The aqObjIterator
object whose items are aqObjProperty
objects that correspond to the properties of the source object.
Example
The following sample code posts the list of process properties and their values to the log.
JavaScript, JScript
props = aqObject.GetProperties(p);
while (props.HasNext())
{
prop = props.Next();
Log.Message (prop.Name + ": " + aqConvert.VarToStr(prop.Value));
}
Python
p = Sys.Process("MyApplication")
props = aqObject.GetProperties(p)
while props.HasNext():
prop = props.Next()
Log.Message(prop.Name + ": " + aqConvert.VarToStr(prop.Value))
VBScript
Set props = aqObject.GetProperties(p)
While props.HasNext
Set prop = props.Next
Log.Message prop.Name & ": " & aqConvert.VarToStr(prop.Value)
Wend
DelphiScript
props := aqObject.GetProperties (p);
while (props.HasNext) do
begin
prop := props.Next;
Log.Message (prop.Name + ': ' + aqConvert.VarToStr(prop.Value));
end;
C++Script, C#Script
props = aqObject["GetProperties"](p);
while (props["HasNext"]())
{
prop = props["Next"]();
Log.Message (prop["Name"] + ": " + aqConvert["VarToStr"](prop["Value"]));
}
See Also
aqObject.GetPropertyValue Method
aqObject.SetPropertyValue Method
aqObject.GetFields Method
aqObject.GetMethods Method
aqObject.GetEvents Method
aqObjIterator Object