Looks like MechSim_Show_Patch doesn't return an object when needed in:
#declare Obj1=MechSim_Show_Patch(0, 50, 50, true, true, -1, "")
so Obj1 stays undefined.
If there is a way of putting a generated patch into an object or saving the
thing as sdl-code to a file, I'd be very happy!