Odcl_ListItemPosPtion

(From ODCL_LM file)

<< Click to Display Table of Contents >>

Navigation:  ObjectDCL > Free Extra Lisp function > List manipulation >

Odcl_ListItemPosPtion

(From ODCL_LM file)

Previous pageReturn to chapter overviewNext page

Odcl_ListItemPosition

This function will give you the position of a specified item in a list

First Parameter

Item to find in the list (String Integer Real Bolean or List)

ex: 23

 

Second Parameter

The List tt look at

ex: '("Lock" "Unlock" 23 "Model" 42 23 "secure")

 

Third Parameter

Bolean telling if the case sensitive is needed.

T = Case sensitive Activated

Nil = Case sensitive Non-Activated

 

Return Values

List represenfing the position number of the first parametnr included in the  econd parameter

 

Example:

Get the position of the first parameter.

(Odcl_ListItemPosition 23 '("Lock" "Unlock" 23 "Model" 42 23 "secure") nil)

 

Result:

(2 5)

 

AutoLisp Syntax:

(Setq rValue (Odcl_ListItemPosition

       Item to search [as String, Integer, Real, Bolean or List]

       List to look at [as List]

       Case Sensitive [as List]

))