Skip to content

repo-docs #522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ private static void onNotification(object sender, NotificationEventArgs e)
}
```

For more examples [check](https://github.com/DomCR/ACadSharp/tree/master/src/ACadSharp.Examples).
For more code examples [check](https://github.com/DomCR/ACadSharp/tree/master/src/ACadSharp.Examples).

For more information visit the :construction: [wiki](https://github.com/DomCR/ACadSharp/wiki) :construction: .
Visit the :construction: [wiki](https://github.com/DomCR/ACadSharp/wiki) :construction: for the API specification of the library.

Check the [documentation](https://github.com/DomCR/ACadSharp/tree/master/docs/) for specific information about some use cases.

Building
---
Expand Down
Empty file added docs/CadDocumentDocs.md
Empty file.
Empty file added docs/CadObjectDocs.md
Empty file.
Empty file added docs/CadReaderDocs.md
Empty file.
Empty file added docs/CadWriterDocs.md
Empty file.
Empty file added docs/EntityDocs.md
Empty file.
Empty file added docs/NonGraphicalObjectDocs.md
Empty file.
45 changes: 45 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# ACadSharp

ACadSharp is a pure C# library to read/write cad files like dxf/dwg.

## Quick Start

### Read

If you want to read a cad file you just need to pick the reader that matches the format, for dwg files you can use [`ACadSharp.IO.DwgReader`](https://github.com/DomCR/ACadSharp/wiki/ACadSharp.IO.DwgReader) or [`ACadSharp.IO.DxfReader`](https://github.com/DomCR/ACadSharp/wiki/ACadSharp.IO.DxfReader) for a dxf file.

The following example shows how to use the `DwgReader` using the static `Read()` method, the `DxfReader` has the equivalent method as well.

```C#
CadDocument doc = DwgReader.Read(file);
```

Both readers have a parameter to configure the reader behaviour and a notification system to log information about possible issues that may occur during the read operation, for more information check [CadReader](./CadReaderDocs.md).

### Document operations

Once you have read the [``CadDocument``](https://github.com/DomCR/ACadSharp/wiki/ACadSharp.CadDocument) or created a new one, you can perform any operation that you may need:

- Check or modify the existing entities and extract any information like geometry, color, layer, lineType...
- Create new entities in the model.
- Create new table entries like Layers, LineTypes, Blocks...
- Add, read or remove ``XData`` in any object in the document.

For more information about how the CadDocument is structured check [CadDocument](./CadDocumentDocs.md).

To understand the common properties of the different elements in the document check the documentation for the different types of objects:
- [CadObject](./CadObjectDocs.md)
- [Entity](./EntityDocs.md)
- [NonGraphicalObject](./NonGraphicalObjectDocs.md)
- [TableEntry](./TableEntryDocs.md)

### Write

Save your file using the [``DwgWriter``](https://github.com/DomCR/ACadSharp/wiki/ACadSharp.IO.DwgWriter) or [``DxfWriter``](https://github.com/DomCR/ACadSharp/wiki/ACadSharp.IO.DxfWriter) depending on the format that you want to use.

```C#
string file = "your file path";
DwgWriter.Write(file, doc);
```

Similar as with the `CadReader` the `CadWriter` have a configuration and a notification system, for more information check [CadReader](./CadWriterDocs.md).
Empty file added docs/TableEntryDocs.md
Empty file.