Distinguished Contributor
212 Posts
6 Kudos
Registered: ‎10-03-2003
Post 1 of 2

Block Scale

128 Views, 1 Replies
06-13-2005 11:14 AM
I'm all tangled up here and can't see the light. Anyone know how to set the scale when the block is inserted?

Public Function MyBlock()
Dim db As Database = HostApplicationServices.WorkingDatabase()
Dim trans As Transaction = db.TransactionManager.StartTransaction()
Dim bt As BlockTable = trans.GetObject(db.BlockTableId, OpenMode.ForWrite)
Dim btr As BlockTableRecord = trans.GetObject(bt(btr.ModelSpace), OpenMode.ForWrite)
Dim br As New BlockReference(Pt1Res.Value, CreateMyBlockDefinition())
br.Rotation = angR

'br.scale = ???

MyBlockId = btr.AppendEntity(br)
trans.AddNewlyCreatedDBObject(br, True)
End Try
Return MyBlockId
End Function
Distinguished Contributor
212 Posts
6 Kudos
Registered: ‎10-03-2003
Post 2 of 2

Re: Block Scale

06-13-2005 12:00 PM in reply to: Mikko
Got it.

Dim theScale As Scale3d = New scale3d(somedouble, somedouble, somedouble)
br.ScaleFactors = theScale
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!