<?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 Dimension Association with VB in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3506928#M54964</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you Associate a dimension to a line using VB. I have not had any results searching for an example of this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jun 2012 18:27:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-06-19T18:27:30Z</dc:date>
    <item>
      <title>Dimension Association with VB</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3506928#M54964</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you Associate a dimension to a line using VB. I have not had any results searching for an example of this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2012 18:27:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3506928#M54964</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-19T18:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dimension Association with VB</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3507062#M54965</link>
      <description>&lt;P&gt;Take a look at this code, not sure about if this helps, though&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://forums.autodesk.com/autodesk/attachments/autodesk/152/24647/1/Parametric%20VB%20Net%20Code.txt" target="_blank"&gt;http://forums.autodesk.com/autodesk/attachments/autodesk/152/24647/1/Parametric%20VB%20Net%20Code.txt&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#800000"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2012 19:27:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3507062#M54965</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-06-19T19:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Dimension Association with VB</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3507094#M54966</link>
      <description>&lt;P&gt;Thanks for the response Hallex. I'll take a look at that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not looking for parametrics, just normal entities and associative dimensions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I came across a post about reactors and using LISP, that I'm currently trying to hack something together in VB to operate with reactors. I'm not sure how this will turn out though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2012 19:45:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3507094#M54966</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-19T19:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dimension Association with VB</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3507268#M54967</link>
      <description>&lt;P&gt;Ok, I understand, but to create extension dictionary to set associativity&lt;/P&gt;&lt;P&gt;will be spend a lot of work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is simple way:&lt;/P&gt;&lt;PRE&gt;        [CommandMethod("assocdim")]
        public void CreateAssocDim()
        {
            Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
            Database db = doc.Database;
            Editor ed = doc.Editor;
            PromptEntityOptions peo = new PromptEntityOptions("\nSelect line: ");
            peo.SetRejectMessage("\nYou have to select line only!");
            peo.AddAllowedClass(typeof(Autodesk.AutoCAD.DatabaseServices.Line), true);
            PromptEntityResult res = ed.GetEntity(peo);
            if (res.Status != PromptStatus.OK) return;
            ObjectId id = res.ObjectId;

            using (Transaction trans = db.TransactionManager.StartTransaction())
            {
                try
                {

                    Autodesk.AutoCAD.DatabaseServices.Line ln = trans.GetObject(id, OpenMode.ForRead) as Autodesk.AutoCAD.DatabaseServices.Line;
                    Point3d p1 = ln.StartPoint;
                    Point3d p2 = ln.EndPoint;
                    Point3d txpt = p1;

                    Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("dimassoc", 2);

                    doc.SendStringToExecute("_dimlinear end " + p1.X.ToString() + "," + p1.Y.ToString() + "," + p1.Z.ToString() +
                        " end " + p2.X.ToString() + "," + p2.Y.ToString() + "," + p2.Z.ToString() + " " +
                            txpt.X.ToString() + " " + txpt.Y.ToString() + "," + txpt.Z.ToString() + " ", true, false, false);


                    trans.Commit();
                }

                catch (System.Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }
            }
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;If this is not enough so &amp;nbsp;say me about&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#800000"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2012 21:02:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3507268#M54967</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-06-19T21:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dimension Association with VB</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3507420#M54968</link>
      <description>&lt;P&gt;Does setting the DIMASSOC variable do wht you need?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2012 23:23:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3507420#M54968</guid>
      <dc:creator>jeff</dc:creator>
      <dc:date>2012-06-19T23:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dimension Association with VB</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3507596#M54969</link>
      <description>&lt;P&gt;Hi Jeff&lt;/P&gt;&lt;P&gt;The DIMASSOC variable doesn't affect creation of the associative dimension&lt;/P&gt;&lt;P&gt;usual way, unfortunately&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#008000"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2012 04:22:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3507596#M54969</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-06-20T04:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dimension Association with VB</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3508184#M54970</link>
      <description>&lt;P&gt;Thank you Hallex !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you already know, I'm sure,&amp;nbsp;that worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nice and&amp;nbsp;simple.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've read many of your other posts to peoples questions and pick up on many things. Your a good guy to have on here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been with Autocad since v2.17 and have programed with it extensively, but this .Net stuff is a real challenge to get the hang of.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Makes me feel like a Knob / Newbie again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2012 13:07:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3508184#M54970</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-20T13:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dimension Association with VB</title>
      <link>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3508246#M54971</link>
      <description>&lt;P&gt;Brian, thanks for your&amp;nbsp;warm words&lt;/P&gt;&lt;P&gt;I'm happy if I can help,&lt;/P&gt;&lt;P&gt;Happy coding &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#ff0000"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2012 13:25:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/dimension-association-with-vb/m-p/3508246#M54971</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-06-20T13:25:38Z</dc:date>
    </item>
  </channel>
</rss>

