'Extracting shape information from DWG (WoutWare CadLib)
We are trying to extract data from a DWG file (more specifically DxfModel) and cannot find how to get the actual shape. Preferably, we would like to be able to get a list of the coordinates from the Entities but that's not something I can find out how to retrieve. I have populated an array with the different DxfBlocks, and am hoping to now get entities from that list (preferably some [x, y] formatting but I cannot find how this can be done from the docs)
//Read the Dwg file into memory
DwgReader dwgReader = new(fileName);
DxfModel dxfModel = dwgReader.Read();
//Get the blocks in the file
DxfBlock[] blocks = GetBlocks(dxfModel);
var entities = blocks[0].Entities;
Thank you in advance,
Torben
EDIT: I am using the .NET Standard 2.0 Version of the library (https://www.woutware.com/).
Docs can be found here https://www.woutware.com/doc/NetCore2.0/index.html
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
