Press ENTER when acad window appears
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Press ENTER when acad window appears

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
gizmowiebe
Guest





Posted: Tue Dec 21, 2004 11:16 pm    Post subject: Press ENTER when acad window appears Reply with quote

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

Back to top
James Belshan
Guest





Posted: Tue Dec 21, 2004 11:57 pm    Post subject: Re: Press ENTER when acad window appears Reply with quote

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
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB