Message 1 of 6
VB GetPoint Errors (NOT VBA)
Not applicable
12-20-2002
08:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
I am writing the following VB (NOT VBA) Activex DLL to get a Point on the
drawing area, thru a Visual Basic Form, using a Command in Vusal Lisp.
I have a simple form with a one button:
VISUAL BASIC ACTIVEX DLL
Class Code: Class Name: mSlides
Public Sub SlideLib()
Set frmTest = New frmSlides
frmTest.Show vbModal
While caso = 1
BuscarPunto
frmTest.Show vbModal
Wend
Unload frmTest
End Sub
Module CODE:
Sub BuscarPunto()
Dim PUNTO As Variant
MsgBox "Donde lo desea insertar", vbOKOnly
PUNTO = ThisDrawing.Utility.GetPoint(, "Seleccione un Punto")
End Sub
Form CODE:
Private Sub Form_Load()
Set acadApp = GetObject(, "AutoCAD.Application")
Set ThisDrawing = acadApp.ActiveDocument
End Sub
Private Sub Slide_ButtonClk()
caso = 1
Unload Me
End Sub
This is my VisualLisp Program
(defun c:slides ()
(vl-load-com)
(setq acd (vlax-get-acad-object))
(setq srv (vlax-invoke acd "getinterfaceobject" "HRTSLIDELIB.mSlides"))
(setq ret (vlax-invoke srv "slidelib"))
)
I have several questions:
1. Why do I have to use the Instruction:
MsgBox "Donde lo desea insertar", vbOKOnly
in my Code, If I don`t put this instruction the AutoCAD2002 hangs up.
2. Why do I have to use the while in my Code, I have been Unable to write
the Slide_Button Click as follows:
Private Sub Slide_ButtonClk()
Unload Me
BuscarPunto
frmTest.Show vbModal
End Sub
If I write this code AutoCAD2002, hangs up.
So in resume,
I would like tow write an ActiveX DLL, with a form, and a button , which
lets me pick a point in the drawing area and the return to the form.
Sorry for my English
Caracas-Venezuela
I need help, the program is working but it doesn't look natural.
I am writing the following VB (NOT VBA) Activex DLL to get a Point on the
drawing area, thru a Visual Basic Form, using a Command in Vusal Lisp.
I have a simple form with a one button:
VISUAL BASIC ACTIVEX DLL
Class Code: Class Name: mSlides
Public Sub SlideLib()
Set frmTest = New frmSlides
frmTest.Show vbModal
While caso = 1
BuscarPunto
frmTest.Show vbModal
Wend
Unload frmTest
End Sub
Module CODE:
Sub BuscarPunto()
Dim PUNTO As Variant
MsgBox "Donde lo desea insertar", vbOKOnly
PUNTO = ThisDrawing.Utility.GetPoint(, "Seleccione un Punto")
End Sub
Form CODE:
Private Sub Form_Load()
Set acadApp = GetObject(, "AutoCAD.Application")
Set ThisDrawing = acadApp.ActiveDocument
End Sub
Private Sub Slide_ButtonClk()
caso = 1
Unload Me
End Sub
This is my VisualLisp Program
(defun c:slides ()
(vl-load-com)
(setq acd (vlax-get-acad-object))
(setq srv (vlax-invoke acd "getinterfaceobject" "HRTSLIDELIB.mSlides"))
(setq ret (vlax-invoke srv "slidelib"))
)
I have several questions:
1. Why do I have to use the Instruction:
MsgBox "Donde lo desea insertar", vbOKOnly
in my Code, If I don`t put this instruction the AutoCAD2002 hangs up.
2. Why do I have to use the while in my Code, I have been Unable to write
the Slide_Button Click as follows:
Private Sub Slide_ButtonClk()
Unload Me
BuscarPunto
frmTest.Show vbModal
End Sub
If I write this code AutoCAD2002, hangs up.
So in resume,
I would like tow write an ActiveX DLL, with a form, and a button , which
lets me pick a point in the drawing area and the return to the form.
Sorry for my English
Caracas-Venezuela
I need help, the program is working but it doesn't look natural.