Notifications
Clear all

[Closed] How does genClassID is supposed to work?

[left]
[/left]
Hi, guys! I’m trying to create some extra-scripted-buttons for using with MAX, and after taking a look at help files and related documents, I think I’ve got them working. I’ve been reading about ClassID, and the help file says:

[left]The class ID is basically a pair of numbers, chosen randomly so that (hopefully) they won’t conflict with another plug-in. MAXScript provides a method to generate a fresh random class ID each time you run it:

[/left]
[left]genClassID[returnValue:<boolean>]

[/left]
[left]This method generates a random class ID similar to #(0x9b7ea231, 0xb6db86ef), and prints it by default to Listener. You can cut and paste this class ID into your script to use the generated ID.
[/left]

Well, that may be silly to you, but what in the world do you have to put in the listener to obtain those pair of numbers? I understand that <boolean> has to be ‘true’ or ‘false’, but if I type…

genClassID[returnValue:true]

[font=Verdana]… listener points me an error. I’ve tried with several combinations of symbols, but couldn’t get it.

Can you point me how to type this sentence to obtain those numbers?

Thanks!
[/font] [left]
[/left]

3 Replies
 PEN

genClassID()

Hey, Paul, thanks a lot dude

For future reference, any time you see parameters to a method in the help file and they’re enclosed within square brackets it means those parameters are optional.

genClassID [returnValue:<boolean>] means you can execute the command as either:

genClassID()

or

genClassID returnValue:true (or false)

The square brackets do not get included in your code.