<?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: Get Annotation Scale of Mtext in Civil 3D Customization Forum</title>
    <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12641035#M2236</link>
    <description>&lt;P&gt;No, but when I add&amp;nbsp;&lt;SPAN&gt;Acmgd.dll the Acdbmgd.dll automatically will be removed and I get a lot of error.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Mar 2024 16:49:52 GMT</pubDate>
    <dc:creator>mehdi-guida</dc:creator>
    <dc:date>2024-03-14T16:49:52Z</dc:date>
    <item>
      <title>Get Annotation Scale of Mtext</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12624478#M2230</link>
      <description>&lt;P&gt;&lt;EM&gt;Hi&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;How can I get annotation scale (of mtext) by .net?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mehdiguida_3-1709829308910.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1334553iA15481E64F11A5D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mehdiguida_3-1709829308910.png" alt="mehdiguida_3-1709829308910.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 15:06:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12624478#M2230</guid>
      <dc:creator>mehdi-guida</dc:creator>
      <dc:date>2024-03-08T15:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Get Annotation Scale of Mtext</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12639130#M2231</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3391061"&gt;@mehdi-guida&lt;/a&gt;&amp;nbsp;I'm not sure if this is the best way to do it, but it seems to work on the Mtext objects I've tested with.&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;        [CommandMethod("ShowMtextAnnoScale")]
        public void showmtextscale()
        {
            var doc = Application.DocumentManager.MdiActiveDocument;
            var ed = doc.Editor;
            var db = doc.Database;
            var entPrompt = new PromptEntityOptions("\nSelect an Mtext:");
            entPrompt.SetRejectMessage("...not an Mtext object.");
            entPrompt.AddAllowedClass(typeof(MText), true);
            var entSel = ed.GetEntity(entPrompt);
            if (entSel.Status != PromptStatus.OK)
                return;
            ObjectContextManager ocm = db.ObjectContextManager;
            ObjectContextCollection occ = ocm.GetContextCollection("ACDB_ANNOTATIONSCALES");

            using (Transaction tr = db.TransactionManager.StartTransaction())
            {
                var mtext = (MText)tr.GetObject(entSel.ObjectId, OpenMode.ForRead);
                if(mtext.Annotative == AnnotativeStates.False)
                {
                    ed.WriteMessage("\nSelected Mtext not annotative!");
                    return;
                }
                //the ObjectContexts class is in the Autodesk.AutoCAD.Internal namespace
                var oContexts = ObjectContexts.GetContexts(mtext, occ.Name);
                var scale = "";
                foreach( var context in oContexts )
                {
                    if (context.Name == occ.CurrentContext.Name)
                    {
                        scale = occ.CurrentContext.Name;
                        break;
                    }
                    scale = oContexts[0].Name;
                }
                ed.WriteMessage("\nSelected Mtext has the current annoscale of {0}.", scale);
            }
        }
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 13 Mar 2024 22:50:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12639130#M2231</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2024-03-13T22:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Get Annotation Scale of Mtext</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12640776#M2232</link>
      <description>&lt;P&gt;Thank You So So So much for reply.&lt;/P&gt;&lt;P&gt;The only error I couldn't solve that is :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mehdiguida_0-1710428907721.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1337147iEAC2583E66B6D9B5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mehdiguida_0-1710428907721.png" alt="mehdiguida_0-1710428907721.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 15:09:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12640776#M2232</guid>
      <dc:creator>mehdi-guida</dc:creator>
      <dc:date>2024-03-14T15:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get Annotation Scale of Mtext</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12640796#M2233</link>
      <description>&lt;P&gt;Add the following:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Using Autodesk.AutoCAD.Internal;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 15:16:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12640796#M2233</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2024-03-14T15:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Get Annotation Scale of Mtext</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12640846#M2234</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;I already used that. but its color shows it never used.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mehdiguida_1-1710430117643.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1337166iB1E9ADB615878689/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mehdiguida_1-1710430117643.png" alt="mehdiguida_1-1710430117643.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 15:30:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12640846#M2234</guid>
      <dc:creator>mehdi-guida</dc:creator>
      <dc:date>2024-03-14T15:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Get Annotation Scale of Mtext</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12640976#M2235</link>
      <description>&lt;P&gt;Thats weird. What year software are you using?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have a reference to the Acmgd.dll?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 16:23:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12640976#M2235</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2024-03-14T16:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Get Annotation Scale of Mtext</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12641035#M2236</link>
      <description>&lt;P&gt;No, but when I add&amp;nbsp;&lt;SPAN&gt;Acmgd.dll the Acdbmgd.dll automatically will be removed and I get a lot of error.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 16:49:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12641035#M2236</guid>
      <dc:creator>mehdi-guida</dc:creator>
      <dc:date>2024-03-14T16:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get Annotation Scale of Mtext</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12641077#M2237</link>
      <description>&lt;P&gt;That does seem strange. Again, what year AutoCAD are you referencing?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the references that I use and I do not have any issues.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hippe013_0-1710435725956.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1337218i2830D5BA456C606F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hippe013_0-1710435725956.png" alt="hippe013_0-1710435725956.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 17:02:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12641077#M2237</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2024-03-14T17:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Get Annotation Scale of Mtext</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12641118#M2238</link>
      <description>&lt;P&gt;I removed references and added them again and everything OK now. Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 17:21:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12641118#M2238</guid>
      <dc:creator>mehdi-guida</dc:creator>
      <dc:date>2024-03-14T17:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Get Annotation Scale of Mtext</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12641120#M2239</link>
      <description>&lt;P&gt;Thank you so much my Hero &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 17:22:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/get-annotation-scale-of-mtext/m-p/12641120#M2239</guid>
      <dc:creator>mehdi-guida</dc:creator>
      <dc:date>2024-03-14T17:22:24Z</dc:date>
    </item>
  </channel>
</rss>

