GiD - The personal pre and post processor

new_n_from_increment

set obj [objarray new_n_from_increment <type> <n> <from> <increment>]

Command similar to new_from_to but not only for integers and with better control of the amount n

Allocate an array of type $type with <n> values filled starting from $from increasing by <increment>

<type>: chararray shortarray intarray longarray longlongarray floatarray doublearray

<n> an integer with the amount of items to be created

<from> arbitrary value (of type) to be set as first item

<increment> arbitrary value (of type) to increase each item

e.g.

set obj [objarray new_n_from_increment floatarray 6 -3.0 1.5] -> -3.0 -1.5 0.0 1.5 3.0 4.5

 

COPYRIGHT © 2022 · GID · CIMNE