Quick Start
Create your first drawing with CadSDK in just a few lines of code.
Here's a simple example of using CadSDK in action.
// Create a new Drawing Session
var session = new DrawingSession
{
ExportFormat = ExportFormat.DWG,
CadVersion = CadVersion.Cad2018
};
// Add elements to the drawing
var line = new Line()
{
StartPoint = new Vector3(0, 0, 0),
EndPoint = new Vector3(100, 100, 0)
};
session.AddElement(line);
// Export
string outputPath = "drawing.dwg";
await session.ExportAndSaveAsync(apiKey, outputPath);
# Coming soon...
Example Breakdown
-
Create a Drawing Session:
The DrawingSession is your main container for the drawing. You can configure the export format and CAD version right at creation.
-
Add Elements:
Create elements (like Line, Circle, Text, etc.) and add them to your session. Each element has its own set of properties you can configure.
-
Export:
When your drawing is ready, use ExportAndSaveAsync to save it as a DWG or DXF file. Don't forget to provide your API key.
What's Next?
Now that you've created your first drawing, learn about:
- Basic Concepts - Understand the fundamental building blocks of CadSDK
- Elements - Explore all available drawing elements
- Customization - Learn how to customize elements and control their properties