Supposing that "expanding a shape group" === "maximizing a docked stencil",
the idea expressed by Jumpy can well be formulated as "you could try OpenEx(...,visOpenDocked + visOpenRO) instead of Open(...)"
Alternatively, you could use:
yourDrawingWindow.Windows.ItemEx("Your Stencil").Activate