Starting in Vectorworks 2018, users can now create menu commands defined by Marionette networks.
To do this, select a wrapper in your file, right click, and choose "Convert to Menu Command..."
This will open a dialog window where you can name this command. A background process will save your Menu Command to a file in your User Folder.
Once that's complete, you can access the menu command by navigating to Tools > Marionette Commands > [YOUR COMMAND HERE]
Try this out with the attached file. After creating your menu command (I named mine 'Color By Size' when I created it), select some or all of the objects on the drawing area and run the command!