.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Block Scale
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
89 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
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
Re: Block Scale
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-13-2005 12:00 PM in reply to:
Mikko
Got it.
Dim theScale As Scale3d = New scale3d(somedouble, somedouble, somedouble)
br.ScaleFactors = theScale
Dim theScale As Scale3d = New scale3d(somedouble, somedouble, somedouble)
br.ScaleFactors = theScale
