.NET

.NET

Reply
Distinguished Contributor
JanetDavidson
Posts: 139
Registered: ‎08-23-2011
Message 1 of 6 (276 Views)
Accepted Solution

What is the proper way to scale a table ? .ScaleFactors doesn't work

276 Views, 5 Replies
12-25-2011 11:27 PM

I am trying to scale down a table by half and "scale factor doesn't work. Am I doing something wrong ? it always come in original size and not scale - I tried to put the line before transaction and after appent and before , Here is Code.

Need help ,Thanks. 

Janet.

   Using tr As Transaction = Mydb.TransactionManager.StartTransaction
                    Dim btr As BlockTableRecord = tr.GetObject(Mydb.CurrentSpaceId, OpenMode.ForWrite)
                    btr.AppendEntity(tb)
                    tr.AddNewlyCreatedDBObject(tb, True)
                    tb.ScaleFactors = New Scale3d(0.5) 
                    tr.Commit()
  End Using

 

*Expert Elite*
Hallex
Posts: 1,569
Registered: ‎10-08-2008
Message 2 of 6 (263 Views)

Re: What is the proper way to scale a table ? .ScaleFactors doesn't work

12-26-2011 06:51 AM in reply to: JanetDavidson

Try this

 

tb.TransformBy(Matrix3d.Scaling(0.5, tb.Position))

tr.Commit()

 

Or perhaps

 

tb.ScaleFactors = New Scale3d(0.5,0.5,1.0)

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Distinguished Contributor
JanetDavidson
Posts: 139
Registered: ‎08-23-2011
Message 3 of 6 (249 Views)

Re: What is the proper way to scale a table ? .ScaleFactors doesn't work

12-26-2011 10:47 PM in reply to: Hallex

Thanks Hallex,

Option one is not what I want . Because the scaling is in a point monitor event, and everytime user moves the mouse it scale down another time.

 

option 2 doesn't work either.

 

Appreciated your help though.

 

Janet.

 

*Expert Elite*
Alfred.NESWADBA
Posts: 8,982
Registered: ‎06-29-2007
Message 4 of 6 (247 Views)

Re: What is the proper way to scale a table ? .ScaleFactors doesn't work

12-26-2011 10:59 PM in reply to: JanetDavidson

Hi,

 

>> Because the scaling is in a point monitor event, and everytime user moves the mouse it scale down another time

Then you check current size to decide if the table has to be scaled down or up or not, just one "if" ... :smileywink:

....or there is something missing in your description to get that understandable for us.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
*Expert Elite*
Hallex
Posts: 1,569
Registered: ‎10-08-2008
Message 5 of 6 (244 Views)

Re: What is the proper way to scale a table ? .ScaleFactors doesn't work

12-26-2011 11:20 PM in reply to: JanetDavidson

@Janet,

In this case you may want to use DrawJig

because of inside the event just SendStringExecute

is working properly and interactive command should be ignored

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Distinguished Contributor
JanetDavidson
Posts: 139
Registered: ‎08-23-2011
Message 6 of 6 (226 Views)

Re: What is the proper way to scale a table ? .ScaleFactors doesn't work

01-02-2012 12:44 AM in reply to: Alfred.NESWADBA

Alfred,  That was good point. men can think better . Happy new year.

 

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 or visit the Installation and Licensing Forum to get help installing your software.