GetProperty Method for LCSession
This method obtains a copy of the current value for an activity property.
Defined In
LCSession Class
Syntax
Set destField = lcSession. GetProperty (propertyToken)
Parameters
Parameter |
Description |
---|---|
propertyToken |
Long. Token representing the activity property. See Appendix B for a list of tokens or use ListProperty method to find the currently available values. |
Return Value
Value |
Description |
---|---|
destField |
LCField. The value of the session property whose token is propertyToken. The properties and methods of LCField can also be used to obtain information about the property, such as its dataType and (using GetFormatStream) maximum length. |
Example
Option Public
Option Declare
Uselsx "*lsxlc"
Sub Initialize
Dim lses As New Lcsession("SessionNameHere")
Dim result As Long, propObj As Variant
Dim pToken As Long, dType As Long, pFlags As Long, pName As String
result = lses.ListProperty(LCLIST_FIRST, pToken, dType, pFlags, pName)
Do While result
Set propObj = lses.GetProperty(pToken)
Print pName & { = } & projObj.Text(0) & {, datatype=} & dtype & _
{, flags=} & pFlags
result = lses.ListProperty(LCLIST_NEXT, pToken, dType, pFlags, pName)
Loop
End Sub
Example Output
Name = SessionNameHere, datatype=6, flags=4
TextFormat = 82, datatype=1, flags=4
CharacterSet = IBMCP1252, datatype=6, flags=4
EventError = 0, datatype=1, flags=0
IgnoreError = 0, datatype=1, flags=0
AgentName = SA2, datatype=6, flags=0
AgentServer = Boo, datatype=6, flags=0
AgentDatabase = LCSamples2.nsf, datatype=6, flags=0