Hi Aspose Support,
I’m working with the latest version of Aspose.CAD for .NET, and I’m building a tool where I need to create a DWG file completely from scratch.
My goal is to add several points to the drawing, but these points need to be visualized using symbolic representations (e.g., a small circle or cross), using blocks.
What I want to do:
Define a block symbol using CadBlockEntity (e.g., a simple circle centered at 0,0).
Register this block properly within the DWG structure (using BlockEntities and/or block tables, if required).
Insert multiple instances of this block using CadInsertObject, positioning them using 3D coordinates (Cad3DPoint).
Add those block references to the drawing, so they are actually visible in tools like AutoCAD or DWG viewers.
Important:
This is not based on an existing DWG template. The drawing is created from a blank new DwgImage() instance.
Request:
Could you please provide a minimal working example that shows how to:
Build and register a block definition.
Insert it correctly using CadInsertObject.
Add those entities to a brand new DWG file.
Ensure the blocks display visually as expected.
I’m looking for a clean, working example that includes any required steps like BasePoint, layer assignments, and how to make sure the inserted blocks are rendered properly in the final drawing.
Thanks in advance for your support — I’d really appreciate a step-by-step or code sample that demonstrates this process clearly.
Best regards,
Abdel