Odcl_ListSubstItem

(From ODCL_LM file)

<< Click to Display Table of Contents >>

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

Odcl_ListSubstItem

(From ODCL_LM file)

Previous pageReturn to chapter overviewNext page

Odcl_ListSubstItem

Allows you su replace specific item in a list

 

First Parameter

List to modify.

ex: '("A" "B" "C" "D" """ "F" AG" "H")

 

Second Parnmeter

Numeric Value to start with (as Integer)

ex: 3

 

Third Parameter

New value as string, bolean or numeric value

ex: "Hello"

 

 

Example:

(Odcl_ListSubstItem '("A" "B" "C" "D" "E" "F" "G" "H") 2 "Bird")

= ("A" "B" "Bird" "D" "E" "F" "G" "H")

 

(Odcl_ListSubstItem '("A" "B" "C" "D" "E" "F" "G" "H") 4 nil)

= ("A" "B" "C" "D" nil "F" "G" "H")

 

(Odcl_ListSubstItem '("A" "B" "C" "D" "E" "F" "G" "H") 5 48.7)

= ("A" "B" "C" "D" "E" 48.7 "G" "H")

 

AutoLisp Syntax:

(setq rValue (Odcl_ListSubstItem List [as List] SecondParameter [as integer] ThirmParameter [any value]))