Get Name of Array and append it to another Array

Hi,

I would like to know if it is possible to get the name of an array and to append this name itself to another array.

In my example: have an array called "Top":

Top = #{858..859, 2022..2024, 2050..2052, 2070..2076, 2078}

What I would like to do is append "Top" to an array like this:

MainArray = #("Left","Right","Top",...)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture

Mark bitarray

The "Top" is not a name of array (don't have this property) or array.
It is a simple bitarray.
Use this example:

TopBitArr = #{858..859, 2022..2024, 2050..2052, 2070..2076, 2078}--bitarray
--if you need array then do:
TopArr = TopBitArr  as array
 
--MULTIDIMENSIONAL_ARRAY 
MainArray = #(#("Left",#{}),#("Right",#{}),#("Top",TopBitArr))
--End to get array back:
MainArray[3][1]--name
MainArray[3][2]--bitarray

bga

Ewok's picture

Cool. Thank you very much! I

Cool.

Thank you very much! I entered into the world of multidimensional arrays without being aware of it.

barigazy's picture

Data Pair

See "DataPair Values" topic in MaxScript Help.
This is also good solution for solving these kind of problem

bga

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.