<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: VB GetPoint Errors (NOT VBA) in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/vb-getpoint-errors-not-vba/m-p/300793#M67265</link>
    <description>Hi Tomas,&lt;BR /&gt;
&lt;BR /&gt;
I will load your code up, try it and see what happens. Until then, or &lt;BR /&gt;
someone else gives you a better option, try using a vba program to &lt;BR /&gt;
access the DLL instead of vlisp. I always use a dvb file to access and &lt;BR /&gt;
run vb dlls.&lt;BR /&gt;
&lt;BR /&gt;
Mike&lt;BR /&gt;
===============================&lt;BR /&gt;
Mike Tuersley&lt;BR /&gt;
PhD @ CADalyst's AutoCAD Clinic&lt;BR /&gt;
http://www.cadonline.com</description>
    <pubDate>Sun, 22 Dec 2002 06:12:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2002-12-22T06:12:51Z</dc:date>
    <item>
      <title>VB GetPoint Errors (NOT VBA)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vb-getpoint-errors-not-vba/m-p/300792#M67264</link>
      <description>Hi.&lt;BR /&gt;
&lt;BR /&gt;
I am writing the following VB (NOT VBA) Activex DLL to get a Point on the&lt;BR /&gt;
drawing area, thru a Visual Basic Form, using a Command in Vusal Lisp.&lt;BR /&gt;
&lt;BR /&gt;
I have a simple form with a one button:&lt;BR /&gt;
&lt;BR /&gt;
VISUAL BASIC ACTIVEX DLL&lt;BR /&gt;
&lt;BR /&gt;
Class Code: Class Name: mSlides&lt;BR /&gt;
&lt;BR /&gt;
Public Sub SlideLib()&lt;BR /&gt;
 Set frmTest = New frmSlides&lt;BR /&gt;
 frmTest.Show vbModal&lt;BR /&gt;
  While caso = 1&lt;BR /&gt;
    BuscarPunto&lt;BR /&gt;
    frmTest.Show vbModal&lt;BR /&gt;
  Wend&lt;BR /&gt;
 Unload frmTest&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Module CODE:&lt;BR /&gt;
&lt;BR /&gt;
Sub BuscarPunto()&lt;BR /&gt;
  Dim PUNTO As Variant&lt;BR /&gt;
  MsgBox "Donde lo desea insertar", vbOKOnly&lt;BR /&gt;
  PUNTO = ThisDrawing.Utility.GetPoint(, "Seleccione un Punto")&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Form CODE:&lt;BR /&gt;
&lt;BR /&gt;
Private Sub Form_Load()&lt;BR /&gt;
  Set acadApp = GetObject(, "AutoCAD.Application")&lt;BR /&gt;
  Set ThisDrawing = acadApp.ActiveDocument&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Private Sub Slide_ButtonClk()&lt;BR /&gt;
  caso = 1&lt;BR /&gt;
 Unload Me&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
This is my VisualLisp Program&lt;BR /&gt;
&lt;BR /&gt;
(defun c:slides ()&lt;BR /&gt;
  (vl-load-com)&lt;BR /&gt;
  (setq acd (vlax-get-acad-object))&lt;BR /&gt;
  (setq srv (vlax-invoke acd "getinterfaceobject" "HRTSLIDELIB.mSlides"))&lt;BR /&gt;
  (setq ret (vlax-invoke srv "slidelib"))&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
I have several questions:&lt;BR /&gt;
&lt;BR /&gt;
1. Why do I have to use the Instruction:&lt;BR /&gt;
    MsgBox "Donde lo desea insertar", vbOKOnly&lt;BR /&gt;
    in my Code, If I don`t put this instruction the AutoCAD2002 hangs up.&lt;BR /&gt;
&lt;BR /&gt;
2. Why do I have to use the while in my Code, I have been Unable to write&lt;BR /&gt;
the Slide_Button Click as follows:&lt;BR /&gt;
&lt;BR /&gt;
Private Sub Slide_ButtonClk()&lt;BR /&gt;
    Unload Me&lt;BR /&gt;
    BuscarPunto&lt;BR /&gt;
    frmTest.Show vbModal&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
If I write this code AutoCAD2002, hangs up.&lt;BR /&gt;
&lt;BR /&gt;
So in resume,&lt;BR /&gt;
&lt;BR /&gt;
I would like tow write an ActiveX DLL, with a form, and a button , which&lt;BR /&gt;
lets me pick a point in the drawing area and the return to the form.&lt;BR /&gt;
&lt;BR /&gt;
Sorry for my English&lt;BR /&gt;
Caracas-Venezuela&lt;BR /&gt;
&lt;BR /&gt;
I need help, the program is working but it doesn't look natural.</description>
      <pubDate>Sat, 21 Dec 2002 04:18:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vb-getpoint-errors-not-vba/m-p/300792#M67264</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-12-21T04:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: VB GetPoint Errors (NOT VBA)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vb-getpoint-errors-not-vba/m-p/300793#M67265</link>
      <description>Hi Tomas,&lt;BR /&gt;
&lt;BR /&gt;
I will load your code up, try it and see what happens. Until then, or &lt;BR /&gt;
someone else gives you a better option, try using a vba program to &lt;BR /&gt;
access the DLL instead of vlisp. I always use a dvb file to access and &lt;BR /&gt;
run vb dlls.&lt;BR /&gt;
&lt;BR /&gt;
Mike&lt;BR /&gt;
===============================&lt;BR /&gt;
Mike Tuersley&lt;BR /&gt;
PhD @ CADalyst's AutoCAD Clinic&lt;BR /&gt;
http://www.cadonline.com</description>
      <pubDate>Sun, 22 Dec 2002 06:12:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vb-getpoint-errors-not-vba/m-p/300793#M67265</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-12-22T06:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: VB GetPoint Errors (NOT VBA)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vb-getpoint-errors-not-vba/m-p/300794#M67266</link>
      <description>Hola Tomas...&lt;BR /&gt;
&lt;BR /&gt;
Como eres de venezuela te contesto en español:&lt;BR /&gt;
&lt;BR /&gt;
Lo que puedes hacer es en VB declarar dos variables publicas una de tipo varint y otra de tipo Boolean, por ejemplo:&lt;BR /&gt;
&lt;BR /&gt;
Public vbPunto As Variant&lt;BR /&gt;
Public vbAceptar As Boolean&lt;BR /&gt;
&lt;BR /&gt;
Y en el boton del cual deseas obtener el punto la asignas a la variable vbAceptar = True, y desde Visual Lisp verificas el dato de la variable vbAceptar, por ejemplo:&lt;BR /&gt;
&lt;BR /&gt;
(if (= (vlax-get-property srv 'vbAceptar) :vlax-true)&lt;BR /&gt;
   (progn&lt;BR /&gt;
      (setq punto (getpoint "\nSeleccione punto: "))&lt;BR /&gt;
      ...aqui debes volver al formulario de VB...&lt;BR /&gt;
   )&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
Entonces los valores de punto se los asignas a vbPunto, pero antes debes crear una variable en Visual Lisp con safearray y asi desde Visual Basic podras leer cada coordenda del punto con vbPunto(0) para X, vbPunto(1) para Y y vbPunto(2) para Z.&lt;BR /&gt;
&lt;BR /&gt;
Yo lo hago de esa forma, en este momento no tengo a mano el codigo completo pero te dejo la idea para que lo hagas...&lt;BR /&gt;
&lt;BR /&gt;
Un saludo de SpeeCAD... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
CHILE&lt;BR /&gt;
FORO: http://www.hispacad.com/foro</description>
      <pubDate>Mon, 10 May 2004 15:07:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vb-getpoint-errors-not-vba/m-p/300794#M67266</guid>
      <dc:creator>Speed_CAD</dc:creator>
      <dc:date>2004-05-10T15:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: VB GetPoint Errors (NOT VBA)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vb-getpoint-errors-not-vba/m-p/300795#M67267</link>
      <description>Umm...SpeedCAD, do you know you're replying to a message that is a year and a half old?</description>
      <pubDate>Tue, 11 May 2004 03:01:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vb-getpoint-errors-not-vba/m-p/300795#M67267</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-05-11T03:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: VB GetPoint Errors (NOT VBA)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vb-getpoint-errors-not-vba/m-p/300796#M67268</link>
      <description>Yep... I know it wivory, but this message did not have answer.&lt;BR /&gt;
&lt;BR /&gt;
excuse me &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;</description>
      <pubDate>Tue, 11 May 2004 18:47:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vb-getpoint-errors-not-vba/m-p/300796#M67268</guid>
      <dc:creator>Speed_CAD</dc:creator>
      <dc:date>2004-05-11T18:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: VB GetPoint Errors (NOT VBA)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vb-getpoint-errors-not-vba/m-p/300797#M67269</link>
      <description>Certainly no need to apologise - I just thought maybe you didn't realise.</description>
      <pubDate>Wed, 12 May 2004 01:52:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vb-getpoint-errors-not-vba/m-p/300797#M67269</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-05-12T01:52:21Z</dc:date>
    </item>
  </channel>
</rss>

