Look up the Max Script help page on the Create Panel, the top of the help page discusses this specifically.
It is up to you to script a “pause” in your execution until the creation is complete
Also look up Command Panel, as you will probably have to set the command panel to Create mode before accessing the Create Panel Scripts
If you’re interested in learning MaxPython API, here’s a link to the bent cylinder demo. It shows how to use the MaxPlus.Factory class to create objects and add modifiers to them…
@expansivemango: Thanks! That looks really interesting. I have not looked at MaxPython at all. I’m not sure of its pros and cons?
I’m not really sure what is the best way to “wait” while the user draws out the mesh in create mode. This is what I made and it seems to work but I wanted to see if there was a more elegant way.
fn createMode prim =(
if okToCreate prim do(
max create mode
c = undefined
while c == undefined do(
c = startObjectCreation prim returnNewNodes: true
)
max modify mode
--Do Stuff
)
)
(createMode box)