Message 1 of 2
trying to open AutoCAD application from MathCAD
Not applicable
11-11-2007
02:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am trying to open the autoCAD application from MathCAD. I am writing the following code behind a MathCAD button. I am newbie at writing code in VBScript. The script is not executing correctly. Can someone please help? Appreciate.
Dim state
Sub PushBtnEvent_Start()
Rem TODO: Add your code here
End Sub
Sub PushBtnEvent_Exec(Inputs)
Dim acad
acad = CreateObject(, "Autocad.Application.16.0")
acad = GetObject(, "Autocad.Application.16.0")
acad.Visible = True
End Sub
Sub PushBtnEvent_Stop()
Rem TODO: Add your code here
End Sub
Sub PushBtn_Click()
If state = 0 Then
state = 1
Else
state = 0
End If
PushBtnEvent_Exec(acad)
End Sub
thanks
-vim
I am trying to open the autoCAD application from MathCAD. I am writing the following code behind a MathCAD button. I am newbie at writing code in VBScript. The script is not executing correctly. Can someone please help? Appreciate.
Dim state
Sub PushBtnEvent_Start()
Rem TODO: Add your code here
End Sub
Sub PushBtnEvent_Exec(Inputs)
Dim acad
acad = CreateObject(, "Autocad.Application.16.0")
acad = GetObject(, "Autocad.Application.16.0")
acad.Visible = True
End Sub
Sub PushBtnEvent_Stop()
Rem TODO: Add your code here
End Sub
Sub PushBtn_Click()
If state = 0 Then
state = 1
Else
state = 0
End If
PushBtnEvent_Exec(acad)
End Sub
thanks
-vim