- Sub GetBlkEnt()
- Dim BlkRef As AcadBlockReference
- Dim Pnt As Variant
- ThisDrawing.Utility.GetEntity Blk, Pnt, "Get Block:"
- Debug.Print BlkRef.Name
- Dim Blk As AcadBlock
- Set Blk = ThisDrawing.Blocks(BlkRef.Name)
- Debug.Print Blk(0).ObjectName
- End Sub
这样就可以取得参照中的图元,但坐标必须进行转换。 |