<?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: Examples for inputPointManager ??? in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/examples-for-inputpointmanager/m-p/335890#M86823</link>
    <description>Attached to this is a slighly more complex example of using&lt;BR /&gt;
the InputManager from AcadX. I wrote this after getting tired&lt;BR /&gt;
of bugging Tony for a more comprehensive example.&lt;BR /&gt;
&lt;BR /&gt;
Use it at your own risk, of course.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Bill&lt;BR /&gt;
"phuwanart" &lt;PCHOONHAPRAN&gt; wrote in message&lt;BR /&gt;
news:f02d7b4.-1@WebX.maYIadrTaRb...&lt;BR /&gt;
I run the Tony's inputpointmanager program in VB5. I don't quite sure about&lt;BR /&gt;
this program. Can anyone tell me about this program or give me a simple&lt;BR /&gt;
explanation to show how this program works.&lt;/PCHOONHAPRAN&gt;</description>
    <pubDate>Thu, 01 Mar 2001 03:38:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2001-03-01T03:38:08Z</dc:date>
    <item>
      <title>Examples for inputPointManager ???</title>
      <link>https://forums.autodesk.com/t5/vba-forum/examples-for-inputpointmanager/m-p/335888#M86821</link>
      <description>I run the Tony's inputpointmanager program in VB5. I don't quite sure about this program. Can anyone tell me about this program or give me a simple explanation to show how this program works.</description>
      <pubDate>Sat, 24 Feb 2001 07:31:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/examples-for-inputpointmanager/m-p/335888#M86821</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2001-02-24T07:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Examples for inputPointManager ???</title>
      <link>https://forums.autodesk.com/t5/vba-forum/examples-for-inputpointmanager/m-p/335889#M86822</link>
      <description>On Sat, 24 Feb 2001 07:31:51 -0800, phuwanart&lt;BR /&gt;
&lt;PCHOONHAPRAN&gt; wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;I run the Tony's inputpointmanager program in VB5. I don't quite sure about this program. Can anyone tell me about this program or give me a simple explanation to show how this program works.&lt;BR /&gt;
&lt;BR /&gt;
Here's a simple demo of InputManager which creates a circle and moves&lt;BR /&gt;
it around on a drawing.&lt;BR /&gt;
Watch out for word wrapping!&lt;BR /&gt;
&lt;BR /&gt;
Create a UserForm with a CommandButton.&lt;BR /&gt;
In Tools &amp;gt; References check AcadX 1.0 Type Library&lt;BR /&gt;
Set the CommandButton to run the PlaceCircle sub.&lt;BR /&gt;
&lt;BR /&gt;
Add this to Userform General Declarations&lt;BR /&gt;
&lt;BR /&gt;
Option Explicit&lt;BR /&gt;
Dim mbolCircleDrawn As Boolean&lt;BR /&gt;
Dim mobjCircle As AcadCircle&lt;BR /&gt;
Dim mvarOldPoint As Variant&lt;BR /&gt;
Dim AcadX As ACADXLib.AcadXApplication&lt;BR /&gt;
Dim WithEvents InputMan As AcadXInputManager&lt;BR /&gt;
Dim Acad As AcadApplication&lt;BR /&gt;
&lt;BR /&gt;
Add this to UserForm_Activate()&lt;BR /&gt;
&lt;BR /&gt;
Set Acad = GetObject(, "AutoCAD.Application.15")&lt;BR /&gt;
Set AcadX = Acad.GetInterfaceObject("AcadX.Application")&lt;BR /&gt;
Set InputMan = Acad.GetInterfaceObject("AcadX.InputManager")&lt;BR /&gt;
&lt;BR /&gt;
Add these subs&lt;BR /&gt;
&lt;BR /&gt;
Private Sub InputMan_InputPointEvent(Document As AcadDocument,&lt;BR /&gt;
RawPoint As Variant, ComputedPoint As Variant, ByVal History As Long)&lt;BR /&gt;
'when InputMan.InputPointEventsEnabled is set to True&lt;BR /&gt;
'in PlaceCircle, this event fires whenever the mouse is moved&lt;BR /&gt;
'it will move the circle until the mouse is clicked&lt;BR /&gt;
'(mouse click is detected in PlaceXRef, not here)&lt;BR /&gt;
&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
&lt;BR /&gt;
If History = 0 Then Exit Sub&lt;BR /&gt;
&lt;BR /&gt;
If Not mbolCircleDrawn Then&lt;BR /&gt;
    'place a circle in the drawing to begin with&lt;BR /&gt;
    Set mobjCircle = ThisDrawing.ModelSpace.AddCircle(ComputedPoint,&lt;BR /&gt;
5)&lt;BR /&gt;
    mbolCircleDrawn = True&lt;BR /&gt;
    mvarOldPoint = ComputedPoint&lt;BR /&gt;
Else&lt;BR /&gt;
    'moves the XRef with the cursor until the mouse is clicked&lt;BR /&gt;
    mobjCircle.Move mvarOldPoint, ComputedPoint&lt;BR /&gt;
    mvarOldPoint = ComputedPoint&lt;BR /&gt;
End If&lt;BR /&gt;
  &lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Private Sub PlaceCircle()&lt;BR /&gt;
'enables InputMan.InputPointEvent&lt;BR /&gt;
&lt;BR /&gt;
Dim varDummyPoint As Variant&lt;BR /&gt;
&lt;BR /&gt;
'hide the form&lt;BR /&gt;
Me.Hide&lt;BR /&gt;
&lt;BR /&gt;
'set InputMan.InputPointEvent to fire&lt;BR /&gt;
InputMan.InputPointEventsEnabled = True&lt;BR /&gt;
mbolCircleDrawn = False&lt;BR /&gt;
&lt;BR /&gt;
'this sub will now wait until the mouse is clicked&lt;BR /&gt;
'meanwhile the InputMan.InputPointEvent will create&lt;BR /&gt;
'the circle and move it around&lt;BR /&gt;
varDummyPoint = ThisDrawing.Utility.GetPoint&lt;BR /&gt;
&lt;BR /&gt;
'set InputMan.InputPointEvent disabled&lt;BR /&gt;
'the circle will now stay where it was when&lt;BR /&gt;
'the mouse was clicked&lt;BR /&gt;
InputMan.InputPointEventsEnabled = False&lt;BR /&gt;
&lt;BR /&gt;
'show the form again&lt;BR /&gt;
Me.Show&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Ray Greene.&lt;/PCHOONHAPRAN&gt;</description>
      <pubDate>Wed, 28 Feb 2001 17:06:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/examples-for-inputpointmanager/m-p/335889#M86822</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2001-02-28T17:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Examples for inputPointManager ???</title>
      <link>https://forums.autodesk.com/t5/vba-forum/examples-for-inputpointmanager/m-p/335890#M86823</link>
      <description>Attached to this is a slighly more complex example of using&lt;BR /&gt;
the InputManager from AcadX. I wrote this after getting tired&lt;BR /&gt;
of bugging Tony for a more comprehensive example.&lt;BR /&gt;
&lt;BR /&gt;
Use it at your own risk, of course.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Bill&lt;BR /&gt;
"phuwanart" &lt;PCHOONHAPRAN&gt; wrote in message&lt;BR /&gt;
news:f02d7b4.-1@WebX.maYIadrTaRb...&lt;BR /&gt;
I run the Tony's inputpointmanager program in VB5. I don't quite sure about&lt;BR /&gt;
this program. Can anyone tell me about this program or give me a simple&lt;BR /&gt;
explanation to show how this program works.&lt;/PCHOONHAPRAN&gt;</description>
      <pubDate>Thu, 01 Mar 2001 03:38:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/examples-for-inputpointmanager/m-p/335890#M86823</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2001-03-01T03:38:08Z</dc:date>
    </item>
  </channel>
</rss>

