<?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 .NET drawing a line between two points in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205993#M5380</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Greg:&lt;BR /&gt;&lt;BR /&gt;Have you tried looking at python to accomplish this task?&amp;nbsp; It would probably result in a lot less code on your part.&amp;nbsp; In v10.1 you will be able to associate python code with buttons on a toolbar which should make this even easier.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm Greg's son Corbin, just using his account.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm only just learning vb.net as a first language and introduction into comp programming. I was told by my Greg that it would be a simple start to translate our old VBA code to vb.net for use with Desktop 10. I could venture into another language eventually, but for now I think it's best I just learn one comlpletely. I don't want to be learning two languages at the same time and mixing them up.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Mar 2012 15:59:17 GMT</pubDate>
    <dc:creator>Gregde_Bruin</dc:creator>
    <dc:date>2012-03-09T15:59:17Z</dc:date>
    <item>
      <title>VB .NET drawing a line between two points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205983#M5370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm attempting to fix someone's code that draws a line betweent two points. I'm converting it from VBA to VB .NET.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This section appears to be where it's failing. Right after Debug 8.1 or 8.2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; 'Draw line between points&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim calcLength As Double&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; pSegmentCollection = New Path&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; pLine = New Line&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Draw a line between first point and second point (FromPoint and ToPoint)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; pLine.PutCoords(ToPoint, FromPoint)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Debug.Print("8.1")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;calcLength = pLine.Length&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Debug.Print("8.2")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; pSegmentCollection.AddSegment(pLine)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Debug.Print("8.3")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;cdebruin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 13:34:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205983#M5370</guid>
      <dc:creator>Gregde_Bruin</dc:creator>
      <dc:date>2012-03-07T13:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: VB .NET drawing a line between two points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205984#M5371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Still need help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the exception that I got when I changed it over from user handled:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;System.Runtime.InteropServices.COMException {"The operation was attempted on an empty geometry."}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 14:09:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205984#M5371</guid>
      <dc:creator>Gregde_Bruin</dc:creator>
      <dc:date>2012-03-07T14:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: VB .NET drawing a line between two points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205985#M5372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you post more of the code?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 14:35:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205985#M5372</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2012-03-07T14:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: VB .NET drawing a line between two points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205986#M5373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Still need help.&lt;BR /&gt;&lt;BR /&gt;This is the exception that I got when I changed it over from user handled:&lt;BR /&gt;&lt;BR /&gt;System.Runtime.InteropServices.COMException {"The operation was attempted on an empty geometry."}&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The error is telling you the geometry is empty, which means it does not contain valid points.&amp;nbsp; In the case of a line, it most likely means the from and to points have the same coordinates (which does not define a valid line).&amp;nbsp; Check your points to make sure the coordinates are being set correctly.&amp;nbsp; Also, if FromPoint and ToPoint are accurately named then you're passing them in backwards to the PutCoords() method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 14:41:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205986#M5373</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2012-03-07T14:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: VB .NET drawing a line between two points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205987#M5374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Can you post more of the code?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I ceratinly have the ability.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Imports System&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Imports System.Collections.Generic&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Imports System.Text&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Imports ESRI.ArcGIS.ArcMapUI&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Imports Microsoft.VisualBasic&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Imports ESRI.ArcGIS.Carto&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Imports ESRI.ArcGIS.Geometry&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Imports ESRI.ArcGIS.esriSystem&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Imports ESRI.ArcGIS.Display&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Imports ESRI.ArcGIS.Framework&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Public Class ToolSanLineMake&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Inherits ESRI.ArcGIS.Desktop.AddIns.Tool&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Private m_ismousedown As Boolean = False&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Private m_linefeedback As ESRI.ArcGIS.Display.INewLineFeedback&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Private m_focusmap As iactiveview&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Protected Overrides Sub OnMouseDown(ByVal arg As ESRI.ArcGIS.Desktop.AddIns.Tool.MouseEventArgs)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; MyBase.OnMouseDown(arg)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Dim sanlineCount As Integer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim sanMHcount As Integer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim pLine As ILine&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim mxdoc As IMxDocument = My.ArcMap.Document&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; m_focusmap = CType(mxdoc.FocusMap, IActiveView)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 'pMxApp = My.ArcMap.Application&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'pMxDoc = My.ArcMap.Document&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'pMap = pMxDoc.FocusMap&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'pActiveView = pMap&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; LayerInitialize()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; getLayerSanitaryManholes()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; getLayerSanitaryLines()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; getTableNCsewerContracts()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; If layerErrorCheck() &amp;lt;&amp;gt; "" Then Exit Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; makeOrEdit = "Enter"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; If arg.Shift &amp;lt;&amp;gt; 0 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ' User wants to edit an existing line rather than make a new one&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Call SanLineEdit_MouseDown(ByVal button, ByVal shift, ByVal x, ByVal y)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; MsgBox("User wants to edit")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Exit Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim pFeatureSelection As ESRI.ArcGIS.Carto.IFeatureSelection&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim FromPoint As New Point&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Select two manholes and draw a line in sanline layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Get the first manhole feature, store the coordinates and type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'If the global variable is 0, get the new point (tests for the first or second selection)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; If startSect = 0 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; pFeatureSelection = GetSelectionGeometry(sanmhFeatLyr, x, y)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; sanMHcount = pFeatureSelection.SelectionSet.Count&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; If sanMHcount = 0 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; MsgBox("No manhole was selected.")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Exit Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ElseIf sanMHcount &amp;gt; 1 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; MsgBox("You have selected " &amp;amp; sanMHcount &amp;amp; " manholes. Select the first manhole.")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Exit Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; startSect = 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Get the GID field from poles table and store it in GFKPOLEST&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; pFeatureSelection.SelectionSet.Search(Nothing, True, sanmhFeatCursor)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; sanmhFeature = sanmhFeatCursor.NextFeature&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Test for null manhole ID field: save point or display message box&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; sanlineGfkMHfromVal = checkNullGUID2(sanmhFeature, sanmhGIDfld)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; sanmhMHUPrimElevVal = checkNullNumber(sanmhFeature, sanmhMHrimElevFld)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'sanlineGfkMHfromVal = checkNullString(sanmhFeature, sanmhLegacy_IDfld)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Debug.Print "sanmhMHUPrimElevVal = " &amp;amp; sanmhMHUPrimElevVal&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; FromPoint = sanmhFeature.Shape&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Else 'Get the second manhole feature, store the coordinates and type&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim plFeatureSelection As ESRI.ArcGIS.Carto.IFeatureSelection&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim ToPoint As New Point&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; plFeatureselection = GetSelectionGeometry(sanmhFeatLyr, x, y)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; sanMHcount = plFeatureselection.SelectionSet.Count&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'If No Selection is made Messagebox pops up&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; If sanMHcount = 0 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; MsgBox("No manhole was selected. Please try again.")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Exit Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ElseIf sanMHcount &amp;gt; 1 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'If selection is more than one manhole then again Messagebox pops up&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; MsgBox("You have selected " &amp;amp; sanMHcount &amp;amp; " manholes. Select only one.")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Exit Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Get the GID field from the manholes table&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; plFeatureSelection.SelectionSet.Search(Nothing, True, sanmhFeatCursor)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; sanmhFeature = sanmhFeatCursor.NextFeature&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ToPoint = sanmhFeature.Shape&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; sanlineGfkMHtoVal = checkNullGUID2(sanmhFeature, sanmhGIDfld)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; sanmhMHrimElevVal = checkNullString(sanmhFeature, sanmhMHrimElevFld)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; sanmhLegacy_IDVal = checkNullString(sanmhFeature, sanmhLegacy_IDfld)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Check to make sure that the same manhole was not selected twice&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; If sanlineGfkMHfromVal = sanlineGfkMHtoVal Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; MsgBox("The second manhole selected has the same GID number as the first. Select both manholes again.")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; startSect = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Exit Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; If (sanlineGfkMHfromVal = GUID000) Or (sanlineGfkMHtoVal = GUID000) Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; MsgBox("One or both of the selected manholes is missing its GID value. The line cannot be made until a GID is created.")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; startSect = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Exit Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; startSect = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color:&amp;quot;#0000FF&amp;quot;;"&gt;&lt;BR /&gt; 'Draw line between points&lt;BR /&gt; Dim calcLength As Double = 0&lt;BR /&gt;&lt;BR /&gt; pSegmentCollection = New Path&lt;BR /&gt; pLine = New Line&lt;BR /&gt; Debug.Print("calcLength = " &amp;amp; calcLength)&lt;BR /&gt; Debug.Print("1")&lt;BR /&gt; 'Draw a line between first point and second point (FromPoint and ToPoint)&lt;BR /&gt; pLine.PutCoords(ToPoint, FromPoint)&lt;BR /&gt; Debug.Print("2")&lt;BR /&gt; calcLength = pLine.Length ''***Crashes ArcMap here. Something is wrong with pLine.Length***&lt;BR /&gt; Debug.Print("calcLength = " &amp;amp; calcLength)&lt;BR /&gt; Debug.Print("pLine.Length = " &amp;amp; pLine.Length)&lt;BR /&gt; Debug.Print("3")&lt;BR /&gt; pSegmentCollection.AddSegment(pLine)&lt;BR /&gt; Debug.Print("4")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim FormSanLineEdit1 As New FormSanLineEdit&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; FormSanLineEdit1.ShowDialog()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; m_focusmap.Refresh()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;End Class&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 14:49:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205987#M5374</guid>
      <dc:creator>Gregde_Bruin</dc:creator>
      <dc:date>2012-03-07T14:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: VB .NET drawing a line between two points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205988#M5375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you using the debugging tools to put in breakpoints so that you can evaluate the values of ToPoint, FromPoint, and pLine? In looking through your code, I also notice that you don't declare many of your variables. This can come back to haunt you later.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 15:37:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205988#M5375</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2012-03-07T15:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: VB .NET drawing a line between two points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205989#M5376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Are you using the debugging tools to put in breakpoints so that you can evaluate the values of ToPoint, FromPoint, and pLine? In looking through your code, I also notice that you don't declare many of your variables. This can come back to haunt you later.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've officially been computer programming for two weeks, and I have no idea how to display the values of Point or Line objects/data types.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been using breakpoints and debugging tools to step through the code, which is how I hit the error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, It's not my code, I'm just trying some minimal fixes to get it working again. All the code I've written so far has been explicitly declared.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 15:49:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205989#M5376</guid>
      <dc:creator>Gregde_Bruin</dc:creator>
      <dc:date>2012-03-07T15:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: VB .NET drawing a line between two points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205990#M5377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I figured out what was wrong. I needed to declare my FromPoint and ToPoint variables at the Class level so they would persist long enough to pick up both points.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you, everyone, for the help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 16:36:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205990#M5377</guid>
      <dc:creator>Gregde_Bruin</dc:creator>
      <dc:date>2012-03-07T16:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: VB .NET drawing a line between two points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205991#M5378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I've officially been computer programming for two weeks, and I have no idea how to display the values of Point or Line objects/data types.&lt;BR /&gt;I have been using breakpoints and debugging tools to step through the code, which is how I hit the error.&lt;BR /&gt;Also, It's not my code, I'm just trying some minimal fixes to get it working again. All the code I've written so far has been explicitly declared.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can look at the values in a couple of ways. First, when the code hits the breakpoint, if you put your cursor over a variable, it will show you information about it. If you open the Locals window (Debug|Windows|Locals), you'll see a listing of all the variables used in your code. You can set up Watches on specific variables.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 16:51:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205991#M5378</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2012-03-07T16:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: VB .NET drawing a line between two points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205992#M5379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greg:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you tried looking at python to accomplish this task?&amp;nbsp; It would probably result in a lot less code on your part.&amp;nbsp; In v10.1 you will be able to associate python code with buttons on a toolbar which should make this even easier.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2012 18:26:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205992#M5379</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2012-03-08T18:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: VB .NET drawing a line between two points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205993#M5380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Greg:&lt;BR /&gt;&lt;BR /&gt;Have you tried looking at python to accomplish this task?&amp;nbsp; It would probably result in a lot less code on your part.&amp;nbsp; In v10.1 you will be able to associate python code with buttons on a toolbar which should make this even easier.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm Greg's son Corbin, just using his account.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm only just learning vb.net as a first language and introduction into comp programming. I was told by my Greg that it would be a simple start to translate our old VBA code to vb.net for use with Desktop 10. I could venture into another language eventually, but for now I think it's best I just learn one comlpletely. I don't want to be learning two languages at the same time and mixing them up.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2012 15:59:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-drawing-a-line-between-two-points/m-p/205993#M5380</guid>
      <dc:creator>Gregde_Bruin</dc:creator>
      <dc:date>2012-03-09T15:59:17Z</dc:date>
    </item>
  </channel>
</rss>

