<?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: Polyline2d Question in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451824#M71335</link>
    <description>Bluges correspond to segments.&lt;BR /&gt;
&lt;BR /&gt;
If the polyline is closed, the number of&lt;BR /&gt;
segments equals the number of vertices.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;GREG.TOEWS&gt; wrote in message news:6146244@discussion.autodesk.com...&lt;BR /&gt;
When creating a new Polyline2d, I am assuming that the number of bulges &lt;BR /&gt;
should be 1 less than the number of points? So if you have only 3 points, &lt;BR /&gt;
you have two bulge factors that represent the arcs between points 1/2 and &lt;BR /&gt;
points 2/3. Is that correct? {code}PolyEnt = New &lt;BR /&gt;
Polyline2d(Poly2dType.SimplePoly, PolyPoints, 0.0, True, 0.0, 0.0, &lt;BR /&gt;
PolyBulges){code} Also, just a general question, what does the &lt;BR /&gt;
SetDatabaseDefaults function do? If it sets the default layer, color, &lt;BR /&gt;
linetype, etc then I think the following lines of example code are not in &lt;BR /&gt;
the correct order and the SetDatabase defaults function should be moved &lt;BR /&gt;
before the ColorIndex line. {code} PolyEnt = New &lt;BR /&gt;
Polyline2d(Poly2dType.SimplePoly, PolyPoints, 0.0, True, 0.0, 0.0, &lt;BR /&gt;
PolyBulges) PolyEnt.ColorIndex = 3 Using Trans As Transaction = &lt;BR /&gt;
AcadDoc.TransactionManager.StartTransaction() btr = &lt;BR /&gt;
Trans.GetObject(AcadDoc.Database.CurrentSpaceId, OpenMode.ForWrite) &lt;BR /&gt;
btr.AppendEntity(PolyEnt) PolyEnt.SetDatabaseDefaults() &lt;BR /&gt;
Trans.AddNewlyCreatedDBObject(PolyEnt, True) Trans.Commit() End Using {code} &lt;BR /&gt;
Thanks&lt;/GREG.TOEWS&gt;</description>
    <pubDate>Sat, 21 Mar 2009 05:51:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-03-21T05:51:42Z</dc:date>
    <item>
      <title>Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451822#M71333</link>
      <description>When creating a new Polyline2d, I am assuming that the number of bulges should be 1 less than the number of points? So if you have only 3 points, you have two bulge factors that represent the arcs between points 1/2 and points 2/3. Is that correct?&lt;BR /&gt;
&lt;BR /&gt;
{code}PolyEnt = New Polyline2d(Poly2dType.SimplePoly, PolyPoints, 0.0, True, 0.0, 0.0, PolyBulges){code}&lt;BR /&gt;
&lt;BR /&gt;
Also, just a general question, what does the SetDatabaseDefaults function do? If it sets the default layer, color, linetype, etc then I think the following lines of example code are not in the correct order and the SetDatabase defaults function should be moved before the ColorIndex line.&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
PolyEnt = New Polyline2d(Poly2dType.SimplePoly, PolyPoints, 0.0, True, 0.0, 0.0, PolyBulges)&lt;BR /&gt;
PolyEnt.ColorIndex = 3&lt;BR /&gt;
Using Trans As Transaction = AcadDoc.TransactionManager.StartTransaction()&lt;BR /&gt;
    btr = Trans.GetObject(AcadDoc.Database.CurrentSpaceId, OpenMode.ForWrite)&lt;BR /&gt;
    btr.AppendEntity(PolyEnt)&lt;BR /&gt;
    PolyEnt.SetDatabaseDefaults()&lt;BR /&gt;
    Trans.AddNewlyCreatedDBObject(PolyEnt, True)&lt;BR /&gt;
    Trans.Commit()&lt;BR /&gt;
End Using&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Fri, 20 Mar 2009 20:15:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451822#M71333</guid>
      <dc:creator>GTVic</dc:creator>
      <dc:date>2009-03-20T20:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451823#M71334</link>
      <description>&lt;P&gt;&lt;BR /&gt;Bulges should have the same number of elements as the vertices.  for your 3 point example, bulge(0) is the segment between point1/2 next is point2/3 then between point3/1.  If the polyline is closed, that segment between the last point and the first point can have a bulge.&lt;BR /&gt;&lt;BR /&gt;Honestly, I can't think of any polyline I've tried to apply bulges to that wasn't closed, but I have created open polylines where the bulges were all 0, and I still declare the bulges to be the same size as the points.&lt;BR /&gt;&lt;BR /&gt;As far as SetDatabaseDefaults, I have seen it in a few examples, but I have not called it anywhere in my code.  The Help file has this to say:&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;BR /&gt;This function sets the entity's {Color ,Layer ,Linetype, Linetype scale ,Visibility ,Plot style name ,Line weight} to the default values of the database in which the entity currently resides or, if the entity is not part of a database yet, the current database in the AutoCAD editor is used. (There is also an overload which accepts a database parameter)&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;BR /&gt;But in my experience this all happens automatically.  If you don't set the color or layer of an object when you create it, it goes on the Current layer, with the current "CECOLOR", "CELTYPE", "CELTSCALE"...  &lt;BR /&gt;&lt;BR /&gt;I never bothered to look at the plotstylename or lineweight, because we do not use entity based plot styles.&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2009 21:47:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451823#M71334</guid>
      <dc:creator>chiefbraincloud</dc:creator>
      <dc:date>2009-03-20T21:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451824#M71335</link>
      <description>Bluges correspond to segments.&lt;BR /&gt;
&lt;BR /&gt;
If the polyline is closed, the number of&lt;BR /&gt;
segments equals the number of vertices.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;GREG.TOEWS&gt; wrote in message news:6146244@discussion.autodesk.com...&lt;BR /&gt;
When creating a new Polyline2d, I am assuming that the number of bulges &lt;BR /&gt;
should be 1 less than the number of points? So if you have only 3 points, &lt;BR /&gt;
you have two bulge factors that represent the arcs between points 1/2 and &lt;BR /&gt;
points 2/3. Is that correct? {code}PolyEnt = New &lt;BR /&gt;
Polyline2d(Poly2dType.SimplePoly, PolyPoints, 0.0, True, 0.0, 0.0, &lt;BR /&gt;
PolyBulges){code} Also, just a general question, what does the &lt;BR /&gt;
SetDatabaseDefaults function do? If it sets the default layer, color, &lt;BR /&gt;
linetype, etc then I think the following lines of example code are not in &lt;BR /&gt;
the correct order and the SetDatabase defaults function should be moved &lt;BR /&gt;
before the ColorIndex line. {code} PolyEnt = New &lt;BR /&gt;
Polyline2d(Poly2dType.SimplePoly, PolyPoints, 0.0, True, 0.0, 0.0, &lt;BR /&gt;
PolyBulges) PolyEnt.ColorIndex = 3 Using Trans As Transaction = &lt;BR /&gt;
AcadDoc.TransactionManager.StartTransaction() btr = &lt;BR /&gt;
Trans.GetObject(AcadDoc.Database.CurrentSpaceId, OpenMode.ForWrite) &lt;BR /&gt;
btr.AppendEntity(PolyEnt) PolyEnt.SetDatabaseDefaults() &lt;BR /&gt;
Trans.AddNewlyCreatedDBObject(PolyEnt, True) Trans.Commit() End Using {code} &lt;BR /&gt;
Thanks&lt;/GREG.TOEWS&gt;</description>
      <pubDate>Sat, 21 Mar 2009 05:51:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451824#M71335</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-21T05:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451825#M71336</link>
      <description>Here is a part of my project that will draw what you need&lt;BR /&gt;
{code}&lt;BR /&gt;
        static public void DrawRoundedFrame()&lt;BR /&gt;
        {&lt;BR /&gt;
            Document doc = acadApp.DocumentManager.MdiActiveDocument;&lt;BR /&gt;
            Database db = doc.Database;&lt;BR /&gt;
            Editor ed = doc.Editor;&lt;BR /&gt;
&lt;BR /&gt;
            using (Transaction tr =&lt;BR /&gt;
                          db.TransactionManager.StartTransaction())&lt;BR /&gt;
            {&lt;BR /&gt;
&lt;BR /&gt;
                try&lt;BR /&gt;
                {&lt;BR /&gt;
                    BlockTableRecord btr = tr.GetObject(db.CurrentSpaceId,&lt;BR /&gt;
                          OpenMode.ForWrite, false) as BlockTableRecord;&lt;BR /&gt;
&lt;BR /&gt;
                    PromptPointOptions ppo = new PromptPointOptions(Environment.NewLine +&lt;BR /&gt;
                        "Pick lower left corner point:");&lt;BR /&gt;
                    PromptPointResult prs = ed.GetPoint(ppo);&lt;BR /&gt;
&lt;BR /&gt;
                    if (prs.Status != PromptStatus.OK || prs.Status == PromptStatus.Error)&lt;BR /&gt;
                    {&lt;BR /&gt;
                        return;&lt;BR /&gt;
                    }&lt;BR /&gt;
                    Point3d p1 = prs.Value;&lt;BR /&gt;
                    Point3d p3;&lt;BR /&gt;
                    PromptCornerOptions ppc = new PromptCornerOptions(Environment.NewLine +&lt;BR /&gt;
                        "Pick upper right corner: ", p1);&lt;BR /&gt;
                    PromptPointResult prc = ed.GetCorner(ppc);&lt;BR /&gt;
                    if (prc.Status != PromptStatus.OK || prc.Status == PromptStatus.Error)&lt;BR /&gt;
                    {&lt;BR /&gt;
                        return;&lt;BR /&gt;
                    }&lt;BR /&gt;
&lt;BR /&gt;
                    p3 = prc.Value;&lt;BR /&gt;
&lt;BR /&gt;
                    Double length = Math.Abs(p1.X - p3.X);&lt;BR /&gt;
                    double width = Math.Abs(p1.Y - p3.Y);&lt;BR /&gt;
&lt;BR /&gt;
                    Point3d p2 = new Point3d(p1.X + length, p1.Y + width, 0.0);&lt;BR /&gt;
                    Point3d p4 = new Point3d(p1.X, p2.Y, 0.0);&lt;BR /&gt;
&lt;BR /&gt;
                    PromptDoubleOptions ppd = new PromptDoubleOptions(Environment.NewLine +&lt;BR /&gt;
                        "Enter fillet radius: ");&lt;BR /&gt;
&lt;BR /&gt;
                    ppd.DefaultValue = 10.0;&lt;BR /&gt;
&lt;BR /&gt;
                    PromptDoubleResult pdr = ed.GetDouble(ppd);&lt;BR /&gt;
&lt;BR /&gt;
                    if (pdr.Status != PromptStatus.OK ||&lt;BR /&gt;
                        pdr.Status == PromptStatus.Error ||&lt;BR /&gt;
                        pdr.Status != PromptStatus.Keyword)&lt;BR /&gt;
                    {&lt;BR /&gt;
                        return;&lt;BR /&gt;
                    }&lt;BR /&gt;
                    Double rad = pdr.Value;&lt;BR /&gt;
                    if (rad &amp;gt; width / 2 || rad &amp;gt; length / 2)&lt;BR /&gt;
                    {&lt;BR /&gt;
                        MessageBox.Show("Radius must be less then half of smalles side of rectangle");&lt;BR /&gt;
                        return;&lt;BR /&gt;
                    }&lt;BR /&gt;
&lt;BR /&gt;
                    Double bulge = (Math.Tan((90 / 4) * Math.PI / 180));&lt;BR /&gt;
&lt;BR /&gt;
                    Point3dCollection points = new Point3dCollection();&lt;BR /&gt;
&lt;BR /&gt;
                    Point3d pt1 = new Point3d(p1.X, p1.Y + rad, 0.0);&lt;BR /&gt;
                    Point3d pt2 = new Point3d(p1.X + rad, p1.Y, 0.0);&lt;BR /&gt;
                    Point3d pt3 = new Point3d(p2.X - rad, pt2.Y, 0.0);&lt;BR /&gt;
                    Point3d pt4 = new Point3d(p2.X, pt2.Y + rad, 0.0);&lt;BR /&gt;
                    Point3d pt5 = new Point3d(pt4.X, p2.Y - rad, 0.0);&lt;BR /&gt;
                    Point3d pt6 = new Point3d(pt3.X, p2.Y, 0.0);&lt;BR /&gt;
                    Point3d pt7 = new Point3d(pt2.X, p2.Y, 0.0);&lt;BR /&gt;
                    Point3d pt8 = new Point3d(p1.X, pt5.Y, 0.0);&lt;BR /&gt;
&lt;BR /&gt;
                    points.Add(pt1);&lt;BR /&gt;
                    points.Add(pt2);&lt;BR /&gt;
                    points.Add(pt3);&lt;BR /&gt;
                    points.Add(pt4);&lt;BR /&gt;
                    points.Add(pt5);&lt;BR /&gt;
                    points.Add(pt6);&lt;BR /&gt;
                    points.Add(pt7);&lt;BR /&gt;
                    points.Add(pt8);&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
                    DoubleCollection bulges = new DoubleCollection();&lt;BR /&gt;
&lt;BR /&gt;
                    double[] bulgelist = { bulge, 0, bulge, 0, bulge, 0, bulge, 0 };&lt;BR /&gt;
&lt;BR /&gt;
                    bulges.AddRange(bulgelist);&lt;BR /&gt;
&lt;BR /&gt;
                    Polyline2d pline = new Polyline2d(Poly2dType.SimplePoly, points, 0.0, true, 0.0, 0.0, bulges);&lt;BR /&gt;
&lt;BR /&gt;
                    btr.AppendEntity(pline);&lt;BR /&gt;
                    tr.AddNewlyCreatedDBObject(pline, true);&lt;BR /&gt;
&lt;BR /&gt;
                    ed.Regen();&lt;BR /&gt;
                    tr.Commit();&lt;BR /&gt;
                }&lt;BR /&gt;
                catch (System.Exception ex)&lt;BR /&gt;
                {&lt;BR /&gt;
                    MessageBox.Show(ex.StackTrace);&lt;BR /&gt;
                }&lt;BR /&gt;
            }&lt;BR /&gt;
        }{code}&lt;BR /&gt;
&lt;BR /&gt;
Hope that helps&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Thu, 26 Mar 2009 14:08:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451825#M71336</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2009-03-26T14:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451826#M71337</link>
      <description>Sorry my bad, here is edite version &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
        static public void DrawRoundedFrame()&lt;BR /&gt;
        {&lt;BR /&gt;
            Document doc = acadApp.DocumentManager.MdiActiveDocument;&lt;BR /&gt;
            Database db = doc.Database;&lt;BR /&gt;
            Editor ed = doc.Editor;&lt;BR /&gt;
&lt;BR /&gt;
            using (Transaction tr =&lt;BR /&gt;
                          db.TransactionManager.StartTransaction())&lt;BR /&gt;
            {&lt;BR /&gt;
&lt;BR /&gt;
                try&lt;BR /&gt;
                {&lt;BR /&gt;
                    BlockTableRecord btr = tr.GetObject(db.CurrentSpaceId,&lt;BR /&gt;
                          OpenMode.ForWrite, false) as BlockTableRecord;&lt;BR /&gt;
&lt;BR /&gt;
                    PromptPointOptions ppo = new PromptPointOptions(Environment.NewLine +&lt;BR /&gt;
                        "Pick lower left corner point:");&lt;BR /&gt;
                    PromptPointResult prs = ed.GetPoint(ppo);&lt;BR /&gt;
&lt;BR /&gt;
                    if (prs.Status != PromptStatus.OK || prs.Status == PromptStatus.Error)&lt;BR /&gt;
                    {&lt;BR /&gt;
                        return;&lt;BR /&gt;
                    }&lt;BR /&gt;
                    Point3d p1 = prs.Value;&lt;BR /&gt;
                    Point3d p3;&lt;BR /&gt;
                    PromptCornerOptions ppc = new PromptCornerOptions(Environment.NewLine +&lt;BR /&gt;
                        "Pick upper right corner: ", p1);&lt;BR /&gt;
                    PromptPointResult prc = ed.GetCorner(ppc);&lt;BR /&gt;
                    if (prc.Status != PromptStatus.OK || prc.Status == PromptStatus.Error)&lt;BR /&gt;
                    {&lt;BR /&gt;
                        return;&lt;BR /&gt;
                    }&lt;BR /&gt;
&lt;BR /&gt;
                    p3 = prc.Value;&lt;BR /&gt;
&lt;BR /&gt;
                    Double length = Math.Abs(p1.X - p3.X);&lt;BR /&gt;
                    double width = Math.Abs(p1.Y - p3.Y);&lt;BR /&gt;
&lt;BR /&gt;
                    Point3d p2 = new Point3d(p3.X, p1.Y, 0.0);&lt;BR /&gt;
                    Point3d p4 = new Point3d(p1.X, p3.Y, 0.0);&lt;BR /&gt;
&lt;BR /&gt;
                    PromptDoubleOptions ppd = new PromptDoubleOptions(Environment.NewLine +&lt;BR /&gt;
                        "Enter fillet radius: ");&lt;BR /&gt;
                    ppd.AllowArbitraryInput = true;&lt;BR /&gt;
                    ppd.DefaultValue = 10.0;&lt;BR /&gt;
&lt;BR /&gt;
                    PromptDoubleResult pdr = ed.GetDouble(ppd);&lt;BR /&gt;
&lt;BR /&gt;
                    if (pdr.Status != PromptStatus.OK ||&lt;BR /&gt;
                        pdr.Status == PromptStatus.Error)&lt;BR /&gt;
                    {&lt;BR /&gt;
                        return;&lt;BR /&gt;
                    }&lt;BR /&gt;
                    Double rad = pdr.Value;&lt;BR /&gt;
                    if (rad &amp;gt; width / 2 || rad &amp;gt; length / 2)&lt;BR /&gt;
                    {&lt;BR /&gt;
                        MessageBox.Show("Radius must be less then half\nof the smallest side of rectangle");&lt;BR /&gt;
                        return;&lt;BR /&gt;
                    }&lt;BR /&gt;
&lt;BR /&gt;
                    Double bulge = (Math.Tan((90 / 4) * Math.PI / 180));&lt;BR /&gt;
&lt;BR /&gt;
                    Point3dCollection points = new Point3dCollection();&lt;BR /&gt;
&lt;BR /&gt;
                    Point3d pt1 = new Point3d(p1.X, p1.Y + rad, 0.0);&lt;BR /&gt;
                    Point3d pt2 = new Point3d(p1.X + rad, p1.Y, 0.0);&lt;BR /&gt;
                    Point3d pt3 = new Point3d(p2.X - rad, p1.Y, 0.0);&lt;BR /&gt;
                    Point3d pt4 = new Point3d(p2.X, p1.Y + rad, 0.0);&lt;BR /&gt;
                    Point3d pt5 = new Point3d(p2.X, p3.Y - rad, 0.0);&lt;BR /&gt;
                    Point3d pt6 = new Point3d(pt3.X, p3.Y, 0.0);&lt;BR /&gt;
                    Point3d pt7 = new Point3d(pt2.X, p3.Y, 0.0);&lt;BR /&gt;
                    Point3d pt8 = new Point3d(p1.X, pt5.Y, 0.0);&lt;BR /&gt;
&lt;BR /&gt;
                    points.Add(pt1);&lt;BR /&gt;
                    points.Add(pt2);&lt;BR /&gt;
                    points.Add(pt3);&lt;BR /&gt;
                    points.Add(pt4);&lt;BR /&gt;
                    points.Add(pt5);&lt;BR /&gt;
                    points.Add(pt6);&lt;BR /&gt;
                    points.Add(pt7);&lt;BR /&gt;
                    points.Add(pt8);&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
                    DoubleCollection bulges = new DoubleCollection();&lt;BR /&gt;
&lt;BR /&gt;
                    double[] bulgelist = { bulge, 0, bulge, 0, bulge, 0, bulge, 0 };&lt;BR /&gt;
&lt;BR /&gt;
                    bulges.AddRange(bulgelist);&lt;BR /&gt;
&lt;BR /&gt;
                    Polyline2d pline = new Polyline2d(Poly2dType.SimplePoly, points, 0.0, true, 0.0, 0.0, bulges);&lt;BR /&gt;
&lt;BR /&gt;
                    btr.AppendEntity(pline);&lt;BR /&gt;
                    tr.AddNewlyCreatedDBObject(pline, true);&lt;BR /&gt;
&lt;BR /&gt;
                    ed.Regen();&lt;BR /&gt;
                    tr.Commit();&lt;BR /&gt;
                }&lt;BR /&gt;
                catch (System.Exception ex)&lt;BR /&gt;
                {&lt;BR /&gt;
                    MessageBox.Show(ex.StackTrace);&lt;BR /&gt;
                }&lt;BR /&gt;
            }&lt;BR /&gt;
        }{code}&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Thu, 26 Mar 2009 16:17:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451826#M71337</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2009-03-26T16:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451827#M71338</link>
      <description>People using newsreaders cannot read your code.&lt;BR /&gt;
&lt;BR /&gt;
If you want more help, include you code attached as&lt;BR /&gt;
a text file.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;HALLEX&gt; wrote in message news:6149906@discussion.autodesk.com...&lt;BR /&gt;
Sorry my bad, here is edite version &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; {code} static public void &lt;BR /&gt;
DrawRoundedFrame() { Document doc = &lt;BR /&gt;
acadApp.DocumentManager.MdiActiveDocument; Database db = doc.Database; &lt;BR /&gt;
Editor ed = doc.Editor; using (Transaction tr = &lt;BR /&gt;
db.TransactionManager.StartTransaction()) { try { BlockTableRecord btr = &lt;BR /&gt;
tr.GetObject(db.CurrentSpaceId, OpenMode.ForWrite, false) as &lt;BR /&gt;
BlockTableRecord; PromptPointOptions ppo = new &lt;BR /&gt;
PromptPointOptions(Environment.NewLine + "Pick lower left corner point:"); &lt;BR /&gt;
PromptPointResult prs = ed.GetPoint(ppo); if (prs.Status != PromptStatus.OK &lt;BR /&gt;
|| prs.Status == PromptStatus.Error) { return; } Point3d p1 = prs.Value; &lt;BR /&gt;
Point3d p3; PromptCornerOptions ppc = new &lt;BR /&gt;
PromptCornerOptions(Environment.NewLine + "Pick upper right corner: ", p1); &lt;BR /&gt;
PromptPointResult prc = ed.GetCorner(ppc); if (prc.Status != PromptStatus.OK &lt;BR /&gt;
|| prc.Status == PromptStatus.Error) { return; } p3 = prc.Value; Double &lt;BR /&gt;
length = Math.Abs(p1.X - p3.X); double width = Math.Abs(p1.Y - p3.Y); &lt;BR /&gt;
Point3d p2 = new Point3d(p3.X, p1.Y, 0.0); Point3d p4 = new Point3d(p1.X, &lt;BR /&gt;
p3.Y, 0.0); PromptDoubleOptions ppd = new &lt;BR /&gt;
PromptDoubleOptions(Environment.NewLine + "Enter fillet radius: "); &lt;BR /&gt;
ppd.AllowArbitraryInput = true; ppd.DefaultValue = 10.0; PromptDoubleResult &lt;BR /&gt;
pdr = ed.GetDouble(ppd); if (pdr.Status != PromptStatus.OK || pdr.Status == &lt;BR /&gt;
PromptStatus.Error) { return; } Double rad = pdr.Value; if (rad &amp;gt; width / 2 &lt;BR /&gt;
|| rad &amp;gt; length / 2) { MessageBox.Show("Radius must be less then half\nof &lt;BR /&gt;
the smallest side of rectangle"); return; } Double bulge = (Math.Tan((90 / &lt;BR /&gt;
4) * Math.PI / 180)); Point3dCollection points = new Point3dCollection(); &lt;BR /&gt;
Point3d pt1 = new Point3d(p1.X, p1.Y + rad, 0.0); Point3d pt2 = new &lt;BR /&gt;
Point3d(p1.X + rad, p1.Y, 0.0); Point3d pt3 = new Point3d(p2.X - rad, p1.Y, &lt;BR /&gt;
0.0); Point3d pt4 = new Point3d(p2.X, p1.Y + rad, 0.0); Point3d pt5 = new &lt;BR /&gt;
Point3d(p2.X, p3.Y - rad, 0.0); Point3d pt6 = new Point3d(pt3.X, p3.Y, 0.0); &lt;BR /&gt;
Point3d pt7 = new Point3d(pt2.X, p3.Y, 0.0); Point3d pt8 = new Point3d(p1.X, &lt;BR /&gt;
pt5.Y, 0.0); points.Add(pt1); points.Add(pt2); points.Add(pt3); &lt;BR /&gt;
points.Add(pt4); points.Add(pt5); points.Add(pt6); points.Add(pt7); &lt;BR /&gt;
points.Add(pt8); DoubleCollection bulges = new DoubleCollection(); double[] &lt;BR /&gt;
bulgelist = { bulge, 0, bulge, 0, bulge, 0, bulge, 0 }; &lt;BR /&gt;
bulges.AddRange(bulgelist); Polyline2d pline = new &lt;BR /&gt;
Polyline2d(Poly2dType.SimplePoly, points, 0.0, true, 0.0, 0.0, bulges); &lt;BR /&gt;
btr.AppendEntity(pline); tr.AddNewlyCreatedDBObject(pline, true); &lt;BR /&gt;
ed.Regen(); tr.Commit(); } catch (System.Exception ex) { &lt;BR /&gt;
MessageBox.Show(ex.StackTrace); } } }{code} ~'J'~&lt;/HALLEX&gt;</description>
      <pubDate>Thu, 26 Mar 2009 16:37:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451827#M71338</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-26T16:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451828#M71339</link>
      <description>Agreed, thanks&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Thu, 26 Mar 2009 17:05:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451828#M71339</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2009-03-26T17:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451829#M71340</link>
      <description>Agreed, thanks&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Thu, 26 Mar 2009 17:05:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451829#M71340</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2009-03-26T17:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451830#M71341</link>
      <description>Thanks for the assistance. For the following code, the answer is that &lt;B&gt;PolyBulges.Count&lt;/B&gt; must equal &lt;B&gt;PolyPoints.Count&lt;/B&gt; regardless of the value of the &lt;B&gt;Closed&lt;/B&gt; variable. Otherwise, you will get a hard crash or, as Autodesk likes to call it, a "quick exit".&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
Dim Closed as Boolean&lt;BR /&gt;
Dim PolyEnt As Polyline2d&lt;BR /&gt;
Dim PolyPoints As Point3dCollection&lt;BR /&gt;
Dim PolyBulges As DoubleCollection&lt;BR /&gt;
&lt;BR /&gt;
PolyEnt = New Polyline2d(Poly2dType.SimplePoly, PolyPoints, 0.0, Closed, 0.0, 0.0, PolyBulges)&lt;BR /&gt;
{code}</description>
      <pubDate>Fri, 27 Mar 2009 23:02:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451830#M71341</guid>
      <dc:creator>GTVic</dc:creator>
      <dc:date>2009-03-27T23:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451831#M71342</link>
      <description>I need to read the bulge values in an existing polyline. Could someone point me in the right direction? Also, Is it possible to get an array of all the vertices and bulge factors? Right now I am using GetPointAtParameter.</description>
      <pubDate>Tue, 07 Apr 2009 20:08:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451831#M71342</guid>
      <dc:creator>GTVic</dc:creator>
      <dc:date>2009-04-07T20:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451832#M71343</link>
      <description>Out of curiosity, do you find the docs to be unclear on this?&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;GREG.TOEWS&gt; wrote in message news:6158002@discussion.autodesk.com...&lt;BR /&gt;
I need to read the bulge values in an existing polyline. Could someone point &lt;BR /&gt;
me in the right direction? Also, Is it possible to get an array of all the &lt;BR /&gt;
vertices and bulge factors? Right now I am using GetPointAtParameter.&lt;/GREG.TOEWS&gt;</description>
      <pubDate>Tue, 07 Apr 2009 20:36:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451832#M71343</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-07T20:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451833#M71344</link>
      <description>Somewhat, GetPointAtParameter is not listed in the Visual Studio integrated help except as it applies to curves. The arxdev(.net).chm help file has interesting topics but no actual content for some reason. Unless you know the name of the function you are looking for, it is not easy.</description>
      <pubDate>Tue, 07 Apr 2009 21:38:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451833#M71344</guid>
      <dc:creator>GTVic</dc:creator>
      <dc:date>2009-04-07T21:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451834#M71345</link>
      <description>I was trying to support the older 2D polylines, apparently that functionality is not included for those objects or is harder to find. For the newer LW polylines, there are some simple GetBulge, etc type functions that make this very easy.</description>
      <pubDate>Tue, 07 Apr 2009 23:03:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451834#M71345</guid>
      <dc:creator>GTVic</dc:creator>
      <dc:date>2009-04-07T23:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451835#M71346</link>
      <description>For 'heavy' polylines, you get the vertex data, bulge and segment widths &lt;BR /&gt;
from Vertex2d entities (e.g., 'VERTEX' entity in DXF).&lt;BR /&gt;
&lt;BR /&gt;
You just use something like:&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
    foreach( ObjectId vertexId in myPolyline2d )&lt;BR /&gt;
    {&lt;BR /&gt;
          // Open the vertex and get its data&lt;BR /&gt;
    }&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;GREG.TOEWS&gt; wrote in message news:6158129@discussion.autodesk.com...&lt;BR /&gt;
I was trying to support the older 2D polylines, apparently that &lt;BR /&gt;
functionality is not included for those objects or is harder to find. For &lt;BR /&gt;
the newer LW polylines, there are some simple GetBulge, etc type functions &lt;BR /&gt;
that make this very easy.&lt;/GREG.TOEWS&gt;</description>
      <pubDate>Wed, 08 Apr 2009 00:13:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451835#M71346</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-08T00:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451836#M71347</link>
      <description>Thanks for the info. Here is some code for anyone that is interested. One thing that could be improved is the AppActivate based on a window handle or something else other than the caption text.&lt;BR /&gt;
&lt;BR /&gt;
Code to select and parse polyline (lwpolyline) or polyline2d (old style polyline) vertices:&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
Dim peoGetPoly As New PromptEntityOptions(vbLf + "Select a 2D polyline: ")&lt;BR /&gt;
Dim perGetResult As PromptEntityResult&lt;BR /&gt;
Dim LockObject As DocumentLock&lt;BR /&gt;
Dim GenericObject As DBObject, VertexID As ObjectId&lt;BR /&gt;
Dim PolyOld As Polyline2d, PolyNew As Polyline&lt;BR /&gt;
Dim VertexPT As Point3d, VertexObj As Vertex2d&lt;BR /&gt;
Dim d As Integer&lt;BR /&gt;
&lt;BR /&gt;
TrackerDoc = Application.DocumentManager.MdiActiveDocument&lt;BR /&gt;
&lt;BR /&gt;
LockObject = TrackerDoc.LockDocument()&lt;BR /&gt;
&lt;BR /&gt;
peoGetPoly.SetRejectMessage("(object is not a 2D polyline)")&lt;BR /&gt;
peoGetPoly.AddAllowedClass(GetType(Polyline2d), True)&lt;BR /&gt;
peoGetPoly.AddAllowedClass(GetType(Polyline), True)&lt;BR /&gt;
&lt;BR /&gt;
Me.Hide()&lt;BR /&gt;
AppActivate(Autodesk.AutoCAD.ApplicationServices.Application.MainWindow.Text)&lt;BR /&gt;
&lt;BR /&gt;
perGetResult = TrackerDoc.Editor.GetEntity(peoGetPoly)&lt;BR /&gt;
&lt;BR /&gt;
Me.Show()&lt;BR /&gt;
System.Windows.Forms.Application.DoEvents()&lt;BR /&gt;
&lt;BR /&gt;
If perGetResult.ObjectId = ObjectId.Null Then&lt;BR /&gt;
    ' No polyline selected&lt;BR /&gt;
    LockObject.Dispose()&lt;BR /&gt;
    Exit Sub&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
Using Trans As Transaction = TrackerDoc.TransactionManager.StartTransaction()&lt;BR /&gt;
    GenericObject = Trans.GetObject(perGetResult.ObjectId, OpenMode.ForRead)&lt;BR /&gt;
    If GenericObject IsNot Nothing Then&lt;BR /&gt;
        If TypeOf (GenericObject) Is Polyline2d Then&lt;BR /&gt;
            PolyOld = Trans.GetObject(perGetResult.ObjectId, OpenMode.ForRead)&lt;BR /&gt;
            For Each VertexID In PolyOld&lt;BR /&gt;
                VertexObj = Trans.GetObject(VertexID, OpenMode.ForRead)&lt;BR /&gt;
                'X = VertexObj.Position.X&lt;BR /&gt;
                'Y = VertexObj.Position.Y&lt;BR /&gt;
                'Bulge = VertexObj.Bulge&lt;BR /&gt;
            Next&lt;BR /&gt;
            'Length = PolyOld.Length&lt;BR /&gt;
        Else&lt;BR /&gt;
            PolyNew = Trans.GetObject(perGetResult.ObjectId, OpenMode.ForRead)&lt;BR /&gt;
            For d = 0 To PolyNew.NumberOfVertices - 1&lt;BR /&gt;
                VertexPT = PolyNew.GetPoint3dAt(d)&lt;BR /&gt;
                'X = VertexPT.X&lt;BR /&gt;
                'Y = VertexPT.Y&lt;BR /&gt;
                'Bulge = PolyNew.GetBulgeAt(d)&lt;BR /&gt;
            Next d&lt;BR /&gt;
            'Length = PolyNew.Length&lt;BR /&gt;
        End If&lt;BR /&gt;
    End If&lt;BR /&gt;
End Using&lt;BR /&gt;
&lt;BR /&gt;
LockObject.Dispose()&lt;BR /&gt;
{code}</description>
      <pubDate>Wed, 08 Apr 2009 20:35:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451836#M71347</guid>
      <dc:creator>GTVic</dc:creator>
      <dc:date>2009-04-08T20:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451837#M71348</link>
      <description>&lt;P&gt;&lt;BR /&gt;This is the solution I have for Activating or Focusing on a Window.  Put this declaration in your code somewhere accessible.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;System.Runtime.InteropServices.DllImport("user32.dll")&amp;gt; _&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;BR /&gt;Shared Function SetFocus(ByVal hwnd As IntPtr) As IntPtr&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;BR /&gt;End Function&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Then you can call it with SetFocus(DocumentObject.UnmanagedObject) or SetFocus(Application.MainWindow.Handle)&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2009 21:09:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451837#M71348</guid>
      <dc:creator>chiefbraincloud</dc:creator>
      <dc:date>2009-04-08T21:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451838#M71349</link>
      <description>There should be no need to activate any window in your code.&lt;BR /&gt;
&lt;BR /&gt;
The managed runtime will automatically hide your form when you make a call &lt;BR /&gt;
to any API that prompts the user on the command line (e.g., GetEntity(), &lt;BR /&gt;
GetPoint() etc.), and will automatically show it after the input is &lt;BR /&gt;
acquired, so there should be no reason do any kind of window activation &lt;BR /&gt;
unless there's something funky going on that you haven't mentioned.&lt;BR /&gt;
&lt;BR /&gt;
Remove the Me.Hide, and Me.Show and AutoCAD should automatically hide/show &lt;BR /&gt;
your form (if it is a modal form).&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;GREG.TOEWS&gt; wrote in message news:6158912@discussion.autodesk.com...&lt;BR /&gt;
Thanks for the info. Here is some code for anyone that is interested. One &lt;BR /&gt;
thing that could be improved is the AppActivate based on a window handle or &lt;BR /&gt;
something else other than the caption text. Code to select and parse &lt;BR /&gt;
polyline (lwpolyline) or polyline2d (old style polyline) vertices: {code} &lt;BR /&gt;
Dim peoGetPoly As New PromptEntityOptions(vbLf + "Select a 2D polyline: ") &lt;BR /&gt;
Dim perGetResult As PromptEntityResult Dim LockObject As DocumentLock Dim &lt;BR /&gt;
GenericObject As DBObject, VertexID As ObjectId Dim PolyOld As Polyline2d, &lt;BR /&gt;
PolyNew As Polyline Dim VertexPT As Point3d, VertexObj As Vertex2d Dim d As &lt;BR /&gt;
Integer TrackerDoc = Application.DocumentManager.MdiActiveDocument &lt;BR /&gt;
LockObject = TrackerDoc.LockDocument() peoGetPoly.SetRejectMessage("(object &lt;BR /&gt;
is not a 2D polyline)") peoGetPoly.AddAllowedClass(GetType(Polyline2d), &lt;BR /&gt;
True) peoGetPoly.AddAllowedClass(GetType(Polyline), True) Me.Hide() &lt;BR /&gt;
AppActivate(Autodesk.AutoCAD.ApplicationServices.Application.MainWindow.Text) &lt;BR /&gt;
perGetResult = TrackerDoc.Editor.GetEntity(peoGetPoly) Me.Show() &lt;BR /&gt;
System.Windows.Forms.Application.DoEvents() If perGetResult.ObjectId = &lt;BR /&gt;
ObjectId.Null Then ' No polyline selected LockObject.Dispose() Exit Sub End &lt;BR /&gt;
If Using Trans As Transaction = &lt;BR /&gt;
TrackerDoc.TransactionManager.StartTransaction() GenericObject = &lt;BR /&gt;
Trans.GetObject(perGetResult.ObjectId, OpenMode.ForRead) If GenericObject &lt;BR /&gt;
IsNot Nothing Then If TypeOf (GenericObject) Is Polyline2d Then PolyOld = &lt;BR /&gt;
Trans.GetObject(perGetResult.ObjectId, OpenMode.ForRead) For Each VertexID &lt;BR /&gt;
In PolyOld VertexObj = Trans.GetObject(VertexID, OpenMode.ForRead) 'X = &lt;BR /&gt;
VertexObj.Position.X 'Y = VertexObj.Position.Y 'Bulge = VertexObj.Bulge Next &lt;BR /&gt;
'Length = PolyOld.Length Else PolyNew = &lt;BR /&gt;
Trans.GetObject(perGetResult.ObjectId, OpenMode.ForRead) For d = 0 To &lt;BR /&gt;
PolyNew.NumberOfVertices - 1 VertexPT = PolyNew.GetPoint3dAt(d) 'X = &lt;BR /&gt;
VertexPT.X 'Y = VertexPT.Y 'Bulge = PolyNew.GetBulgeAt(d) Next d 'Length = &lt;BR /&gt;
PolyNew.Length End If End If End Using LockObject.Dispose() {code}&lt;/GREG.TOEWS&gt;</description>
      <pubDate>Wed, 08 Apr 2009 21:52:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451838#M71349</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-08T21:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451839#M71350</link>
      <description>Thanks for the code and tips. This one is a modeless form though...</description>
      <pubDate>Wed, 08 Apr 2009 22:06:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451839#M71350</guid>
      <dc:creator>GTVic</dc:creator>
      <dc:date>2009-04-08T22:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451840#M71351</link>
      <description>Try setting the form's Visible property to false rather than&lt;BR /&gt;
calling Hide().&lt;BR /&gt;
&lt;BR /&gt;
I have no problem hiding a modeless form and do not&lt;BR /&gt;
need to activate the AutoCAD window when I do that.&lt;BR /&gt;
&lt;BR /&gt;
I also assume you're calling the ShowModelessDialog()&lt;BR /&gt;
method to show your form initially?&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;GREG.TOEWS&gt; wrote in message news:6159012@discussion.autodesk.com...&lt;BR /&gt;
Thanks for the code and tips. This one is a modeless form though...&lt;/GREG.TOEWS&gt;</description>
      <pubDate>Wed, 08 Apr 2009 22:38:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451840#M71351</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-08T22:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline2d Question</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451841#M71352</link>
      <description>Thanks, I tested using ShowModelessDialog. This gives you an "always on top" position on the main AutoCAD window and then you don't need to activate the AutoCAD window.&lt;BR /&gt;
&lt;BR /&gt;
I was using .Show and that requires the setfocus code because selecting the dialog does not activate the AutoCAD window below as with ShowModelessDialog.</description>
      <pubDate>Wed, 08 Apr 2009 22:59:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline2d-question/m-p/2451841#M71352</guid>
      <dc:creator>GTVic</dc:creator>
      <dc:date>2009-04-08T22:59:07Z</dc:date>
    </item>
  </channel>
</rss>

