.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 2
Mikko
232 Views, 1 Reply

Block Scale

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
1 REPLY 1
Message 2 of 2
Mikko
in reply to: Mikko

Got it.

Dim theScale As Scale3d = New scale3d(somedouble, somedouble, somedouble)
br.ScaleFactors = theScale

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost