GiD - The personal pre and post processor

replace_value

objarray replace_value <obj> <value_old> <value_new>

To replace in the whole array <value_old> by <value_new>

<value_old> or <value_new> could be the special string “NaN” (not a number), but only for floatarray and doublearray cases

e.g.

set obj [objarray new floatarray -values {1.0 2.0 3.0 2.0} ] # -> 1.0 2.0 3.0 2.0 objarray replace_value $obj 2.0 5.0 # -> 1.0 5.0 3.0 5.0 objarray replace_value $obj 3.0 NaN # -> 1.0 5.0 NaN 5.0 set GID_NO_RESULT -3.4028234663852886e+38 objarray replace_value $obj NaN $GID_NO_RESULT # -> 1.0 5.0 -3.4028234663852886e+38 5.0 objarray replace_value $obj $GID_NO_RESULT NaN # -> 1.0 5.0 NaN 5.0

COPYRIGHT © 2022 · GID · CIMNE