先打开了图纸空间的块表记录:
- Dim '// Add the block reference to paper space
- oBTR.AppendEntity(br) As BlockTableRecord = CType(oBT(BlockTableRecord.PaperSpace).GetObject(OpenMode.ForWrite), BlockTableRecord)
然后新建了layout,并设为当前layout. :
- Dim oLayoutObjId As ObjectId
- oLayoutObjId = oLayoutManager.CreateLayout("MyLayout" + Str(row))
- Dim oLayout As Layout = tr.GetObject(oLayoutObjId, OpenMode.ForWrite)
- oLayout.Initialize()
- oLayoutManager.CurrentLayout = "MyLayout" + Str(row)
再在 oBTR里添加插入的块:
但是图是显示在layout1里了,不是我新建的。
怎么能写到我新建的layout里呢?
谢谢
|