bnameStr是你要插入块的名字- Dim bt As BlockTable = trans.GetObject(db.BlockTableId, OpenMode.ForWrite)
- 'blockId = bt(bnameStr)
- 'Dim pt As Point3d
- 'pt = insPoint.TransformBy(ed.CurrentUserCoordinateSystem)
- '// Create a block reference
- 'Dim br As BlockReference = New BlockReference(pt, blockId)
- '// Add the block reference to Model space
- 'oBTR.AppendEntity(br)
- 'trans.AddNewlyCreatedDBObject(br, True)
|