Create your geometry > Clear the script editor > turn on echo all commands > apply x ray > drag the mel used to the shelf.