API Component.Property.GetListIndex: Difference between revisions
Appearance
XML import API auto-gen |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| (24 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
{| class="mtx-class-macrotable wikitable" | |||
Gets a single lists index value from a property by line number | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" class="mtx-class-macrohead" | '''GetListIndex''' | |||
|- | |||
| colspan="2" | Gets a single lists index value from a property by line number | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE | |||
| width="90%" | Handle | |||
|- | |||
| colspan="2" | The component handle to get the property of | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING | |||
| width="90%" | Property | |||
|- | |||
| colspan="2" | The textual name of the property | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG | |||
| width="90%" | LineIx | |||
|- | |||
| colspan="2" | The lists line (first is zero) to read the index of | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
== | ==Detailed description== | ||
''[[ | Given a ''Property'' which is a list type, this gets the index (3-character) part of the line corresponding to ''LineIx'', with zero being the first line. This index can then be used in [[API Component.Property.GetListItem|GetListItem]] and related calls. | ||
The lines of the property are stored in its filter - see [[API Component.Property.GetFilter|GetFilter]]. | |||
No checks are performed to establish the property is of the correct type. | |||
==Examples== | |||
===Calling in a calculation=== | |||
* Declare a variable 'result' of type STRING | * Declare a variable 'result' of type STRING | ||
* Add to a calculation icon: result = ::Component.Property.GetListIndex(handle, "property", lineix) | * Add to a calculation icon: <pre class="brush:[cpp]">result = ::Component.Property.GetListIndex(handle, "property", lineix)</pre> | ||
Latest revision as of 14:11, 13 July 2026
Detailed description
Given a Property which is a list type, this gets the index (3-character) part of the line corresponding to LineIx, with zero being the first line. This index can then be used in GetListItem and related calls.
The lines of the property are stored in its filter - see GetFilter.
No checks are performed to establish the property is of the correct type.
Examples
Calling in a calculation
- Declare a variable 'result' of type STRING
- Add to a calculation icon:
result = ::Component.Property.GetListIndex(handle, "property", lineix)