Results 1 to 2 of 2

Thread: Press ENTER when acad window appears

  1. #1
    gizmowiebe Guest

    Press ENTER when acad window appears

    Hi there,

    I'm creating a block manager for home use. And i'm using mslides because they look better than the thumbnails. When a button is pushed a drawing will open set to top view and zoom extends and then I'm trying to use the sendcommand option. But when the save as window appears it doesn't enter.

    This is my code

    ************************************************** ************
    Private Sub mslide_Click()

    Dim strSearchDoc As String
    Dim objDoc As AcadDocument

    strSearchDoc = pathfolder & "\" & ListBox1.Value & "\" & ListBox2.Value & ".dwg"

    For Each objDoc In ThisDrawing.Application.Documents
    If UCase(strSearchDoc) = UCase(objDoc.path & "\" & objDoc.name) Then
    Else
    AcadApplication.Documents.Open (pathfolder & "\" & ListBox1.Value & "\" & ListBox2.Value & ".dwg")

    End If
    Next

    Dim NewDirection(0 To 2) As Double
    NewDirection(0) = -0: NewDirection(1) = 0: NewDirection(2) = 1
    ThisDrawing.ActiveViewport.Direction = NewDirection
    ThisDrawing.ActiveViewport = ThisDrawing.ActiveViewport
    Dim zoom As AcadDocument
    ZoomExtents

    Me.hide
    ThisDrawing.SendCommand "Mslide" & vbCr & vbCr

    End Sub

    ***************************************

    the last vbCr doesnt work.

    Anyone any ideas.

    THX

    Wiebe

  2. #2
    James Belshan Guest
    This does what you want, but it may still stop on the dialog box if you hit
    the ENTER key after you start your macro.


    Me.hide
    SendKeys "{ENTER}"
    ThisDrawing.SendCommand "Mslide" & vbCr
    End Sub

Similar Threads

  1. "What's new " window
    By okguy in forum Cadence
    Replies: 2
    Last Post: 09-21-2005, 01:10 PM
  2. Replies: 6
    Last Post: 06-09-2005, 01:10 AM
  3. simulate enter key being pressed
    By swu in forum Customization
    Replies: 4
    Last Post: 02-27-2005, 02:36 PM
  4. Auto Enter thru a autoloading command in acaddoc.lsp
    By Chris Chiles in forum Customization
    Replies: 3
    Last Post: 02-20-2005, 11:10 PM
  5. why is the window > new used ?
    By prasath in forum Pro/Engineer
    Replies: 2
    Last Post: 01-30-2005, 02:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other forums: Access Forum - Microsoft Office Forum - Exchange Server Forum