I am attempting to create a BlockTableRecord that contains arcs and circles. Creating the BTR is working great but after I insert a block reference and explode it, all the arcs and circles have been created as ellipses. The code below is what I am using. I have placed a break point where the item gets appended to the BTR and verified that the item is a circle but when everything is finished, it's an ellipse. Anyone know how to fix this? If I run the same code but change the BlockTableRecord to model space, the circles draw fine.
Using AcTrans As Transaction = oAcadTm.StartTransaction
Using AcBlocks As BlockTable = oAcadDb.BlockTableId.GetObject(OpenMode.ForWrite)
''create the new block record....
block = New BlockTableRecord
block.Name = blockName
blockId = AcBlocks.Add(block)
AcTrans.AddNewlyCreatedDBObject(block, True)
''add the entities to the block record....
For Each item As Entity In entities
block.AppendEntity(item)
AcTrans.AddNewlyCreatedDBObject(item, True)
Next
End Using
AcTrans.Commit()
End Using
The only way I can think of that that would happen is if the block reference (INSERT) was not scaled uniformly when you exploded it. If you explode a non-uniformly scaled block containing circular arcs, autocad will replace the arcs with elliptical arcs to maintain the visual appearance of the block reference.
Wow. You know, sometimes it's the little things. The block was *not* uniformly scaled. The X and Y scales were the same but the Z scale factor was set to 1. Thanks for the help.