Notifications
Clear all

[Closed] create multiple dialogs

Hello all,

Im trying to make a simple sticky note type maxscript. mostly for educational reasons to improve my scripting skills.

Anyways I want to create more than one dialog using the same rollout block. I tried putting it into a function and making its title one of the arguments of the function but whenever I try to create more than one dialog it just replaces the existing one.

any help or guidance would be appreciated
thank you

3 Replies

make sure you’re not calling destroydialog anywhere… any time you call createdialog you should be making a new instance… not destroying the old one, so you should be able to get as many as you want up on screen.

A dialog is simply an alternative representation of a rollout. You cannot have the same rollout displayed twice, period. You need to create a different rollout value (the rollout value is referenced by a user variable that points at the memory address where it is stored). It is not possible (AFAIK) to call copy() on a rollout to duplicate it – the new variable would still point at the same value…

You can either use the rolloutCreator functions or build your rollout as string values and call execute() to get the rollout value. Inside the string, you can manipulate the variable name, title and any other details of each rollout if you want.

thanks bobo using the rollout creator functions was really easy to implement and it did exactly what I wanted.

Cheers :arteest: