.NET

Reply
Distinguished Contributor
junoj
Posts: 116
Registered: ‎02-26-2009
Message 1 of 3 (136 Views)

Scaling Objects that are in Model Space

136 Views, 2 Replies
05-24-2012 03:14 PM

I would like to scale all objects by x2 in Model Space using reference point xyz=0. Just like one would do via scale command. However, I would like to do so programmatically in VB.NET

I have no idea where to even start, so any advice or suggestions will be plenty appreciated.

Thank you,

 

-Jay

*Expert Elite*
chiefbraincloud
Posts: 752
Registered: ‎02-13-2008
Message 2 of 3 (134 Views)

Re: Scaling Objects that are in Model Space

05-24-2012 03:57 PM in reply to: junoj

Well, you'll need to open the ModelSpace BlockTableRecord, and for every entity you find there, do

entity.TransformBy(Matrix3d.Scaling(2, Point3d.Origin))

Dave O.                                                                  Sig-Logos32.png
Distinguished Contributor
junoj
Posts: 116
Registered: ‎02-26-2009
Message 3 of 3 (97 Views)

Re: Scaling Objects that are in Model Space

05-30-2012 08:06 AM in reply to: chiefbraincloud

Thank you very much Chiefbrain . . .  it works, but the speed is significantly slower when I run it in AutoCAD 2011 vs. AutoCAD 2008.  In 2008 it scales the same drawing in split seconds vs. in 2011 it takes about 3-4 seconds.

 

Very frustrating and inconsistent, as to why? If anyone has any idea or advice I would appreciate you help very much.

 

Thank you in advance,

 

-Jay

 

p.s. The drawing size is less than 1mb. And I running both CADs on Win7 Pro 32bit

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community