Message 1 of 3
Wait or Pause after SendCommand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey Folks,
Looking at trying to do something new, from my point of view.
The idea is as follows;
- Find current layer
- Make current layer equal wipeout layer.
- Start wipeout command
- Change back to original layer
Coding is as following.
Sub WipeOut() Dim CurrLayer As AcadLayer Dim NewLayer As AcadLayer ' Find Current Layer Set CurrLayer = ThisDrawing.ActiveLayer ' Current Layer Debug.Print CurrLayer.Name ' Change To New Layer Set NewLayer = ThisDrawing.Layers.Item("Wipeout") ThisDrawing.ActiveLayer = NewLayer Debug.Print NewLayer.Name ThisDrawing.SendCommand "Wipeout" & vbCr ' Reset To Previous Layer ThisDrawing.ActiveLayer = CurrLayer Debug.Print ActiveLayer.Name End Sub
It all seems to work ok up until point 3. It then reverts back to the original layer before the user gets a chance to start putting in a wipeout.
My question is... Is there a way to put in a pause or something after the wipeout commands starts for the user to be able to start drawing something before the layer gets changed back to its original state? Or is there a smarter way of doing what I'm trying to do?
Thanks & Regards,
Ace