<?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 As per road Width, Need to classification layer-wise in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/as-per-road-width-need-to-classification-layer-wise/m-p/8227600#M24929</link>
    <description>&lt;P&gt;Up to 4 Meter Road Width : Street Road&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4 &amp;nbsp;to 10 Meter Road Width : Minor Road&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;10 &amp;nbsp;to 20 Meter Road Width : Secondary Road&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;20 above &amp;nbsp;Meter Road Width : Major Road&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Sub CheckPolylineWidth()&lt;/P&gt;&lt;P&gt;Dim pl1 As AcadPolyline&lt;BR /&gt;Dim pl2 As AcadPolyline&lt;BR /&gt;Dim pt1 As Variant&lt;BR /&gt;Dim pt2 As Variant&lt;BR /&gt;Dim Dist As Double&lt;/P&gt;&lt;P&gt;' Set the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;"OSMODE" variable to Perpedicular&lt;BR /&gt;ThisDrawing.SerVariable "osmode,128"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;' Select the 2 Polylines.&lt;/P&gt;&lt;P&gt;ThisDrawing.Utility.GetEntity pl1, pt1, "Pick the first Poliline."&lt;/P&gt;&lt;P&gt;pl2 = ThisDrawing.Utility.GetEntity pl1,pt2, "Pick the second Polyline to detect the Road Width."&lt;/P&gt;&lt;P&gt;' Check the distance between the 2 points by drawing a line then get the length of the line&lt;/P&gt;&lt;P&gt;Dim ln As AcadLine&lt;BR /&gt;Dim wd As Double&lt;BR /&gt;Set ln = ThisDrawing.ModelSpace.AddLine(pt1, pt2)&lt;BR /&gt;wd = ln.Length&lt;BR /&gt;If (wd &amp;lt;= 4) Then&lt;BR /&gt;'Set the layer to StreetRoad&lt;BR /&gt;pl1.Layer = "StreetRoad"&lt;BR /&gt;pl2.Layer = "StreetRoad"&lt;BR /&gt;ElseIf (wd &amp;gt; 4 And wd &amp;lt;= 10) Then&lt;/P&gt;&lt;P&gt;'Set the layer to MinorRoad&lt;BR /&gt;pl1.Layer = "MinorRoad"&lt;BR /&gt;pl2.Layer = "MinorRoad"&lt;BR /&gt;ElseIf (wd &amp;gt; 10 And wd &amp;lt;= 20) Then&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;' Set the layer to SecondaryRoad&lt;BR /&gt;pl1.Layer = "SecondaryRoad"&lt;BR /&gt;pl2.Layer = "SecondaryRoad"&lt;BR /&gt;ElseIf (wd &amp;gt; 20) Then&lt;/P&gt;&lt;P&gt;' Set the layer to MajorRoad&lt;BR /&gt;pl1.Layer = "MajorRoad"&lt;BR /&gt;pl2.Layer = "MajorRoad"&lt;/P&gt;&lt;P&gt;Else&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; MsgBox "Unable to determine the distance.", vbExclamation + vbOKOnly&lt;/P&gt;&lt;P&gt;End If&lt;BR /&gt;'Delete the line reference&lt;BR /&gt;ln.Delete&lt;BR /&gt;End Sub&lt;/P&gt;</description>
    <pubDate>Mon, 27 Aug 2018 17:40:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-08-27T17:40:08Z</dc:date>
    <item>
      <title>As per road Width, Need to classification layer-wise</title>
      <link>https://forums.autodesk.com/t5/net-forum/as-per-road-width-need-to-classification-layer-wise/m-p/8227600#M24929</link>
      <description>&lt;P&gt;Up to 4 Meter Road Width : Street Road&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4 &amp;nbsp;to 10 Meter Road Width : Minor Road&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;10 &amp;nbsp;to 20 Meter Road Width : Secondary Road&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;20 above &amp;nbsp;Meter Road Width : Major Road&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Sub CheckPolylineWidth()&lt;/P&gt;&lt;P&gt;Dim pl1 As AcadPolyline&lt;BR /&gt;Dim pl2 As AcadPolyline&lt;BR /&gt;Dim pt1 As Variant&lt;BR /&gt;Dim pt2 As Variant&lt;BR /&gt;Dim Dist As Double&lt;/P&gt;&lt;P&gt;' Set the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;"OSMODE" variable to Perpedicular&lt;BR /&gt;ThisDrawing.SerVariable "osmode,128"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;' Select the 2 Polylines.&lt;/P&gt;&lt;P&gt;ThisDrawing.Utility.GetEntity pl1, pt1, "Pick the first Poliline."&lt;/P&gt;&lt;P&gt;pl2 = ThisDrawing.Utility.GetEntity pl1,pt2, "Pick the second Polyline to detect the Road Width."&lt;/P&gt;&lt;P&gt;' Check the distance between the 2 points by drawing a line then get the length of the line&lt;/P&gt;&lt;P&gt;Dim ln As AcadLine&lt;BR /&gt;Dim wd As Double&lt;BR /&gt;Set ln = ThisDrawing.ModelSpace.AddLine(pt1, pt2)&lt;BR /&gt;wd = ln.Length&lt;BR /&gt;If (wd &amp;lt;= 4) Then&lt;BR /&gt;'Set the layer to StreetRoad&lt;BR /&gt;pl1.Layer = "StreetRoad"&lt;BR /&gt;pl2.Layer = "StreetRoad"&lt;BR /&gt;ElseIf (wd &amp;gt; 4 And wd &amp;lt;= 10) Then&lt;/P&gt;&lt;P&gt;'Set the layer to MinorRoad&lt;BR /&gt;pl1.Layer = "MinorRoad"&lt;BR /&gt;pl2.Layer = "MinorRoad"&lt;BR /&gt;ElseIf (wd &amp;gt; 10 And wd &amp;lt;= 20) Then&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;' Set the layer to SecondaryRoad&lt;BR /&gt;pl1.Layer = "SecondaryRoad"&lt;BR /&gt;pl2.Layer = "SecondaryRoad"&lt;BR /&gt;ElseIf (wd &amp;gt; 20) Then&lt;/P&gt;&lt;P&gt;' Set the layer to MajorRoad&lt;BR /&gt;pl1.Layer = "MajorRoad"&lt;BR /&gt;pl2.Layer = "MajorRoad"&lt;/P&gt;&lt;P&gt;Else&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; MsgBox "Unable to determine the distance.", vbExclamation + vbOKOnly&lt;/P&gt;&lt;P&gt;End If&lt;BR /&gt;'Delete the line reference&lt;BR /&gt;ln.Delete&lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 17:40:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/as-per-road-width-need-to-classification-layer-wise/m-p/8227600#M24929</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-27T17:40:08Z</dc:date>
    </item>
  </channel>
</rss>

