View Single Post
  #1  
Old 28-02-2013, 05:02
FaneDuru FaneDuru is offline
Member
 
Join Date: May 2012
Posts: 35
Question Select Shape after Undo...

I have a GMS file preparing a file for cutting. I treat some cases (powerClip, Group or simple lines nets) and during fine tuning I need to revert at the initial selection. For the cutting shape belonging to a group I try to select it again after Undo (programmatically), but it does not work...
I know the shape name and I use the next code:
Code:
Private Sub btUndo_Click()
    Application.Optimization = True
        ActiveDocument.Undo
    Application.Optimization = False
    ActiveWindow.Refresh
    Application.Refresh
    Prnt.Activate
    Prnt.Shapes("xxx").CreateSelection
End Sub
I also tried:
Code:
Prnt.Shapes.FindShape("xxx").CreateSelection
but it does not work
'Prnt' is the page where the group is, declared at the form class level and it is not nothing...
I mean this code put exactly instead of the line to create selection:
Code:
 Debug.Print Prnt.Shapes("xxx").Name
returns 'xxx'.
I can select the specific shape in a separate piece of code but not after Undo...
I tried also to put those lines in a separate procedure and call it but the same result...

Are there some limitations after using Undo?
How can a I select that shape after Undo?


I use CorelDRAW X5.

Thanks in advance!
Reply With Quote