<?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: How to change scale  using .NET or C# in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2793222#M67439</link>
    <description>&lt;P&gt;Does anyone know how to let the user scale the objects? &amp;nbsp;I need users to be able to see exactly how their scale is going to turn out.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Oct 2010 12:41:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-10-11T12:41:18Z</dc:date>
    <item>
      <title>How to change scale  using .NET or C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2620612#M67432</link>
      <description>Good evening all,&lt;BR /&gt;
&lt;BR /&gt;
I want to change a scale of drawing (all entity) &amp;amp; save it&lt;BR /&gt;
Help me I am using AutoCAD 2010&lt;BR /&gt;
&lt;BR /&gt;
Thanks,</description>
      <pubDate>Fri, 22 Jan 2010 12:26:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2620612#M67432</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-22T12:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to change scale  using .NET or C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2620613#M67433</link>
      <description>Maybe the attached will help.&lt;BR /&gt;
r,&lt;BR /&gt;
dennis</description>
      <pubDate>Fri, 22 Jan 2010 15:56:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2620613#M67433</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-22T15:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to change scale  using .NET or C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2620614#M67434</link>
      <description>Hi djonio ,&lt;BR /&gt;
Thanks a lot for reply it very useful&lt;BR /&gt;
&lt;BR /&gt;
I am able to scale the view but I am facing problem to set origin &lt;BR /&gt;
Please help&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Mon, 25 Jan 2010 07:34:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2620614#M67434</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-25T07:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to change scale  using .NET or C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2620615#M67435</link>
      <description>Hi djonio &lt;BR /&gt;
 &lt;BR /&gt;
Thank's for reply.&lt;BR /&gt;
&lt;BR /&gt;
how to change selected entity scale Only&lt;BR /&gt;
&lt;BR /&gt;
Thanks,</description>
      <pubDate>Thu, 28 Jan 2010 11:22:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2620615#M67435</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-28T11:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to change scale  using .NET or C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2620616#M67436</link>
      <description>Here is an quick xample how to do it&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
   using System;&lt;BR /&gt;
using System.Collections.Generic;&lt;BR /&gt;
using System.Text;&lt;BR /&gt;
using Autodesk.AutoCAD.DatabaseServices;&lt;BR /&gt;
using Autodesk.AutoCAD.GraphicsInterface;&lt;BR /&gt;
using Autodesk.AutoCAD.Runtime;&lt;BR /&gt;
using Autodesk.AutoCAD.Geometry;&lt;BR /&gt;
using Autodesk.AutoCAD.ApplicationServices;&lt;BR /&gt;
using Autodesk.AutoCAD.EditorInput;&lt;BR /&gt;
using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;&lt;BR /&gt;
&lt;BR /&gt;
............................................&lt;BR /&gt;
 // 			credits Tony Tanzillo&lt;BR /&gt;
&lt;BR /&gt;
     public static void Scale(ObjectId id, Point3d basept, double scale)&lt;BR /&gt;
        {&lt;BR /&gt;
            Matrix3d transform = Matrix3d.Scaling(scale,basept);&lt;BR /&gt;
&lt;BR /&gt;
            Database db = id.Database;&lt;BR /&gt;
&lt;BR /&gt;
            using (Transaction tr = db.TransactionManager.StartTransaction())&lt;BR /&gt;
            {&lt;BR /&gt;
                try&lt;BR /&gt;
                {&lt;BR /&gt;
                        Entity ent = (Entity)tr.GetObject(id, OpenMode.ForWrite);&lt;BR /&gt;
&lt;BR /&gt;
                        if (ent != null)&lt;BR /&gt;
                        {&lt;BR /&gt;
                            ent.TransformBy(transform);&lt;BR /&gt;
                        }&lt;BR /&gt;
&lt;BR /&gt;
                    tr.Commit();&lt;BR /&gt;
&lt;BR /&gt;
                }&lt;BR /&gt;
                catch (Autodesk.AutoCAD.Runtime.Exception ex)&lt;BR /&gt;
                {&lt;BR /&gt;
                    AcadApp.ShowAlertDialog(ex.Message);&lt;BR /&gt;
                }&lt;BR /&gt;
&lt;BR /&gt;
            }&lt;BR /&gt;
        }&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
        [CommandMethod("SCE")]&lt;BR /&gt;
        public static void ScaleSelected()&lt;BR /&gt;
        {&lt;BR /&gt;
            Document doc = AcadApp.DocumentManager.MdiActiveDocument;&lt;BR /&gt;
&lt;BR /&gt;
            Editor ed = doc.Editor;&lt;BR /&gt;
&lt;BR /&gt;
            PromptEntityOptions peo = new PromptEntityOptions("\nSelect an Entity: ");&lt;BR /&gt;
&lt;BR /&gt;
            PromptEntityResult res = ed.GetEntity(peo);&lt;BR /&gt;
&lt;BR /&gt;
            if (res.Status != PromptStatus.OK)&lt;BR /&gt;
                return;&lt;BR /&gt;
&lt;BR /&gt;
            PromptPointOptions ppo = new PromptPointOptions("\nPick Base Point: ");&lt;BR /&gt;
            &lt;BR /&gt;
            PromptPointResult pres = ed.GetPoint(ppo);&lt;BR /&gt;
&lt;BR /&gt;
            if (pres.Status != PromptStatus.OK)&lt;BR /&gt;
                return;&lt;BR /&gt;
&lt;BR /&gt;
            PromptDoubleOptions pdo = new PromptDoubleOptions("\nSpecify Scale Factor: ");&lt;BR /&gt;
&lt;BR /&gt;
            PromptDoubleResult dres = ed.GetDouble(pdo);&lt;BR /&gt;
&lt;BR /&gt;
            if (dres.Status != PromptStatus.OK)&lt;BR /&gt;
                return;&lt;BR /&gt;
&lt;BR /&gt;
            ObjectId id = res.ObjectId;&lt;BR /&gt;
&lt;BR /&gt;
            Point3d basept =pres.Value;&lt;BR /&gt;
&lt;BR /&gt;
            double scale = dres.Value;&lt;BR /&gt;
&lt;BR /&gt;
            Scale(id, basept, scale);&lt;BR /&gt;
&lt;BR /&gt;
        }&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Thu, 28 Jan 2010 17:41:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2620616#M67436</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2010-01-28T17:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to change scale  using .NET or C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2620617#M67437</link>
      <description>Hi hallex ,&lt;BR /&gt;
&lt;BR /&gt;
Thanks again&lt;BR /&gt;
Thank you so muchhhhhhhhh for the reply.&lt;BR /&gt;
&lt;BR /&gt;
Have a nice Day</description>
      <pubDate>Fri, 29 Jan 2010 04:06:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2620617#M67437</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-29T04:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to change scale  using .NET or C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2620618#M67438</link>
      <description>Glad if that worked&lt;BR /&gt;
Have a nice day &lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Fri, 29 Jan 2010 07:02:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2620618#M67438</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2010-01-29T07:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to change scale  using .NET or C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2793222#M67439</link>
      <description>&lt;P&gt;Does anyone know how to let the user scale the objects? &amp;nbsp;I need users to be able to see exactly how their scale is going to turn out.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2010 12:41:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-change-scale-using-net-or-c/m-p/2793222#M67439</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-10-11T12:41:18Z</dc:date>
    </item>
  </channel>
</rss>

