[quote user="daniel99"]Set oCSES = CreateComplexShapeElement1(oSES, msdFillModeFilled)[/quote]
Are you confident that you have a valid complex shape? Put an assert test after you create an object to be sure that it's valid...
Debug.Assert Not oCSES Is Nothing
When you queue commands you simulate the action of a user. The zoom level in a view is significant.
You could try to use the MDL function to create a grouped hole. That keeps all your code as procedural. Here's the declaration from MDL help...
- Declare Function mdlElmdscr_createShapeWithHoles Lib "stdmdlbltin.dll" ( _
- ByRef outEdPP As Long , _
- ByVal solidEdP As Long , _
- ByVal holeEdP As Long ) As Long