Remember multilistbox values

Hey, I just started to look into maxscript and I have a little problem with my modifier. This is an example (There is more to the real script, but this is the problem area):



parameters main rollout:rolloutGeneralSettings


arrtestList type:#index animatable:false ui:testList enabled:true

intvalue1 type:#integer animatable:false ui:value1 default:1 enabled:true

intvalue2 type:#integer animatable:false ui:value2 default:1 enabled:true


rollout rolloutGeneralSettings "General Settings" width:162 height:633


multiListBox testList "multilistbox test" width:146 height:9

spinner value1 "V1: "width:80 height:16 range:[0,100,0]

spinner value2 "V2: "width:80 height:16 range:[0,100,0]




I think the problem is the multilistbox type:#, I just cant get it to remember the values, like it does with all my other fields like the spinner (like the intvalue1 and intvalue2) and dropbox. Anyone know what the right type for multilistbox (arrtestList ), or do you need to re-add the value to the multilistbox  in another way?


Comment viewing options

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

Is it a plugin or script?

Hey, I just finished my Array modifier and wanted to post it here in scriptspot, however I'm not sure which section it should be in, plugins or scripts. Anyone who can cast some light on that, since it is made as maxscript, but since the code starts with "plugin modifier" I'm not sure.
If you want to see it, you can find it here:

Anubis's picture

post in script section

Hi, i posted a time ago a few scripted plugs, but the admin move them to the scripts section and explained to me that the plugin section is only for SDK that extend the MaxScript functionality. So, post it in the scripts section.

p.s. - your modifier looks awesome !

my recent MAXScripts RSS (archive here)

McGreed's picture

Ah good to know, cheers, will

Ah good to know, cheers, will add it as soon I can then. :)

McGreed's picture

No luck getting it to

EDIT: Okay, seem that you needed to use sizeTab:1 and not 0 for an empty box. That part works now, but still have the problem that it wont remember the content when I deselect. Do I need to do something to store the array? It works for all my other elements, spinners, dropbox ect.

McGreed's picture

I'm afraid you have to be

I'm afraid you have to be more specific, not sure what you mean, since I never used multibox/array elements before. I can manage arrays in scripts, but don't know how to set it up properly in the UI.
What do you mean with "1 item as val"? And I thought I did make it variable, with tabSizeVariable:true.

Graph's picture

because you defined an array

because you defined an array with 1 item as val and a diffrent size in the UI? and also didnt make the strTab variable in size? just guessing ;)

Raphael Steves

McGreed's picture

tabSize error

Hey, thanks for the quick answer. I tried that before and I keep getting this error:

-- Error occurred in anonymous codeblock; filename: C:\Graphic\Autodesk\3ds Max 2009\Scripts\testscript\; position: 5262
-- Compile error: UI item array size does not match tabSize: specified in zarrPObjectList

And this is the line with the error:

zarrPObjectList type:#stringTab animatable:false ui:arrPObjectList tabSize:1 tabSizeVariable:true enabled:true

Any idea why it wont accept the tabSize?

Garp's picture

multiListBoxes hold array of

A multiListBox holds an array of strings. Try #stringTab.

Comment viewing options

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