<?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 How to set the thickness of a polyline in vb using stand alone program in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5065114#M43795</link>
    <description>&lt;P&gt;Hello, I have code to insert a block and explode it. But I'm now wondering how to set the thickness of the polyline afterwards. Here is what I have so far:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Private Sub InsertBlock(ByVal acadapp As Autodesk.AutoCAD.Interop.AcadApplication, _
                            ByVal acadDoc As Autodesk.AutoCAD.Interop.AcadDocument, _
                            ByVal InsertionPT As Object, _
                            ByVal BlockName As String)

Dim DbxDoc As Object = acadapp.GetInterfaceObject
"ObjectDBX.AxDbDocument.19")
        DbxDoc.Open(BlockDrawing)

Dim Objects(0) As AcadBlock
For Each entry As AcadBlock In CType(DbxDoc.Blocks, IEnumerable)
If (Not entry.IsLayout) AndAlso (Not entry.Name.StartsWith("*")) Then
   Objects(0) = entry
   DbxDoc.CopyObjects(CObj(Objects), acadDoc.Blocks)
End If
Next entry

Dim oBlkRef As AcadBlockReference
oBlkRef = acadDoc.ModelSpace.InsertBlock(InsertionPT, BlockName, 1.0#, 1.0#, 1.0#, 0)
oBlkRef.Explode()

End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The insert block code was supplied to me by Mikko and works great. Thanks again Mikko. But now I'm trying to relieve the user of another step by setting the thickness of the polyline inserted based upon the insertion point. Any help would be appreciated, Thank you.&lt;/P&gt;</description>
    <pubDate>Fri, 30 May 2014 11:35:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-05-30T11:35:22Z</dc:date>
    <item>
      <title>How to set the thickness of a polyline in vb using stand alone program</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5065114#M43795</link>
      <description>&lt;P&gt;Hello, I have code to insert a block and explode it. But I'm now wondering how to set the thickness of the polyline afterwards. Here is what I have so far:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Private Sub InsertBlock(ByVal acadapp As Autodesk.AutoCAD.Interop.AcadApplication, _
                            ByVal acadDoc As Autodesk.AutoCAD.Interop.AcadDocument, _
                            ByVal InsertionPT As Object, _
                            ByVal BlockName As String)

Dim DbxDoc As Object = acadapp.GetInterfaceObject
"ObjectDBX.AxDbDocument.19")
        DbxDoc.Open(BlockDrawing)

Dim Objects(0) As AcadBlock
For Each entry As AcadBlock In CType(DbxDoc.Blocks, IEnumerable)
If (Not entry.IsLayout) AndAlso (Not entry.Name.StartsWith("*")) Then
   Objects(0) = entry
   DbxDoc.CopyObjects(CObj(Objects), acadDoc.Blocks)
End If
Next entry

Dim oBlkRef As AcadBlockReference
oBlkRef = acadDoc.ModelSpace.InsertBlock(InsertionPT, BlockName, 1.0#, 1.0#, 1.0#, 0)
oBlkRef.Explode()

End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The insert block code was supplied to me by Mikko and works great. Thanks again Mikko. But now I'm trying to relieve the user of another step by setting the thickness of the polyline inserted based upon the insertion point. Any help would be appreciated, Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2014 11:35:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5065114#M43795</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-30T11:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the thickness of a polyline in vb using stand alone program</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5066084#M43796</link>
      <description>so you'll probably want a selection set to find all the polys, then poly.constantwidth = x for global width, can also set start and end width indepentely.</description>
      <pubDate>Fri, 30 May 2014 19:37:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5066084#M43796</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-30T19:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the thickness of a polyline in vb using stand alone program</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5067038#M43797</link>
      <description>&lt;P&gt;But I am trying to set the thickness property, not the width of the polyline.&lt;/P&gt;</description>
      <pubDate>Sat, 31 May 2014 21:37:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5067038#M43797</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-31T21:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the thickness of a polyline in vb using stand alone program</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5067194#M43798</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you sometimes have a look at the docs?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Polyline managed class have a Thickness property, so have the COM AcadLWPolyline one (as you're using COM).&lt;/P&gt;</description>
      <pubDate>Sun, 01 Jun 2014 09:24:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5067194#M43798</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2014-06-01T09:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the thickness of a polyline in vb using stand alone program</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5068108#M43799</link>
      <description>&lt;P&gt;I try to look through the help docs, but it's hard to find anything on the out of process commands. With the time it is taking me to try and figure it out, I'm probably going to have to write some AutoLisp programs that I can start from my VB.Net program program using SendCommand. I appreciate the help though.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2014 10:53:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5068108#M43799</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-02T10:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the thickness of a polyline in vb using stand alone program</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5068294#M43800</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;cncah a écrit&amp;nbsp;:&lt;BR /&gt;
&lt;P&gt;I try to look through the help docs, but it's hard to find anything on the out of process commands. With the time it is taking me to try and figure it out, I'm probably going to have to write some AutoLisp programs that I can start from my VB.Net program program using SendCommand. I appreciate the help though.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If I do not misunderstand, for your "out of process" program, you're using the COM API (ActiveX Automation library) which is the same as the one used by VBA and Visual LISP. You'd find the docs for this API here:&lt;/P&gt;
&lt;P&gt;%ProgramFiles%\Common Files\Autodesk Shared\acadauto.chm&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim plineObj As AcadLWPolyline
Dim thickness As Double

...

plineObj.Thickness = thickness&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2014 12:55:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5068294#M43800</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2014-06-02T12:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the thickness of a polyline in vb using stand alone program</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5076378#M43801</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the tip. I got slammed at work and had to put the project on hold for a couple of days but I looked up the help doc that you suggested and thanks a ton for that! I was able to get the polyline into a selection set and set the thickness and change the layer name just fine. I have a question though, I'm using this to get my selection set:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim SelSet As Autodesk.AutoCAD.Interop.AcadSelectionSet

SelSet = ACADapp.ActiveDocument.SelectionSets.Add("SelSet")

SelSet.Select(AcSelect.acSelectionSetLast)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would it be better to try and build the selection set by getting the polyline by layer name or is "AcSelect.acSelectionSetLast" good enough for what I am doing? Just trying to make the program bulletproof is all.&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2014 12:32:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5076378#M43801</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-05T12:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the thickness of a polyline in vb using stand alone program</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5077852#M43802</link>
      <description>&lt;P&gt;I see nothing wrong with your code, but I'm not very proficient with COM, I avoid to use it as far as I can.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2014 20:11:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-set-the-thickness-of-a-polyline-in-vb-using-stand-alone/m-p/5077852#M43802</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2014-06-05T20:11:52Z</dc:date>
    </item>
  </channel>
</rss>

