.NET

Reply
Distinguished Contributor
Mikko
Posts: 212
Registered: ‎10-03-2003
Message 1 of 2 (115 Views)

Block Scale

115 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()
Try
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)
trans.Commit()
Finally
trans.Dispose()
End Try
Return MyBlockId
End Function
Distinguished Contributor
Mikko
Posts: 212
Registered: ‎10-03-2003
Message 2 of 2 (115 Views)

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

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