<?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: how to capture right click in getpoint in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-capture-right-click-in-getpoint/m-p/3185820#M58869</link>
    <description>&lt;P&gt;As Tony mentioned&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://forums.autodesk.com/t5/NET/capture-right-click-in-getpoint/m-p/2595514/highlight/true#M16808"&gt;http://forums.autodesk.com/t5/NET/capture-right-click-in-getpoint/m-p/2595514/highlight/true#M16808&lt;/A&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;pPtOpts.AllowNone = True﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Oct 2011 13:40:41 GMT</pubDate>
    <dc:creator>arcticad</dc:creator>
    <dc:date>2011-10-10T13:40:41Z</dc:date>
    <item>
      <title>how to capture right click in getpoint</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-capture-right-click-in-getpoint/m-p/3185770#M58868</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a function add line to drawing based on points user clicked. It doesn't seem to catch right click. I wonder what could I do to make the code detect right click?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code&lt;/P&gt;&lt;PRE&gt;Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.Runtime


&amp;lt;CommandMethod("GetPointsFromUser")&amp;gt; _

Public Sub GetPointsFromUser()

  '' Get the current database and start the Transaction Manager

  Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument

  Dim acCurDb As Database = acDoc.Database

 

  Dim pPtRes As PromptPointResult

  Dim pPtOpts As PromptPointOptions = New PromptPointOptions("")

 

  '' Prompt for the start point

  pPtOpts.Message = vbLf &amp;amp; "Enter the start point of the line: "

  pPtRes = acDoc.Editor.GetPoint(pPtOpts)

  Dim ptStart As Point3d = pPtRes.Value

  '' Exit if the user presses ESC or cancels the command

  If pPtRes.Status = PromptStatus.Cancel Then Exit Sub

 

  '' Prompt for the end point

  pPtOpts.Message = vbLf &amp;amp; "Enter the end point of the line: "

  pPtOpts.UseBasePoint = True

  pPtOpts.BasePoint = ptStart

  pPtRes = acDoc.Editor.GetPoint(pPtOpts)

  Dim ptEnd As Point3d = pPtRes.Value

 

  If pPtRes.Status = PromptStatus.Cancel Then Exit Sub

 

  '' Start a transaction

  Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction()

 

      Dim acBlkTbl As BlockTable

      Dim acBlkTblRec As BlockTableRecord

 

      '' Open Model space for write

      acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId, _

                                   OpenMode.ForRead)

 

      acBlkTblRec = acTrans.GetObject(acBlkTbl(BlockTableRecord.ModelSpace), _

                                      OpenMode.ForWrite)

 

      '' Define the new line

      Dim acLine As Line = New Line(ptStart, ptEnd)

      acLine.SetDatabaseDefaults()

 

      '' Add the line to the drawing

      acBlkTblRec.AppendEntity(acLine)

      acTrans.AddNewlyCreatedDBObject(acLine, True)

 

      '' Zoom to the extents or limits of the drawing

      acDoc.SendStringToExecute("._zoom _all ", True, False, False)

 

      '' Commit the changes and dispose of the transaction

      acTrans.Commit()

  End Using

End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2011 13:05:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-capture-right-click-in-getpoint/m-p/3185770#M58868</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-10-10T13:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture right click in getpoint</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-capture-right-click-in-getpoint/m-p/3185820#M58869</link>
      <description>&lt;P&gt;As Tony mentioned&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://forums.autodesk.com/t5/NET/capture-right-click-in-getpoint/m-p/2595514/highlight/true#M16808"&gt;http://forums.autodesk.com/t5/NET/capture-right-click-in-getpoint/m-p/2595514/highlight/true#M16808&lt;/A&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;pPtOpts.AllowNone = True﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2011 13:40:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-capture-right-click-in-getpoint/m-p/3185820#M58869</guid>
      <dc:creator>arcticad</dc:creator>
      <dc:date>2011-10-10T13:40:41Z</dc:date>
    </item>
  </channel>
</rss>

