Basic Concepts

Understanding the fundamental building blocks of CadSDK.

  • DrawingSession

    DrawingSession is the root object containing your drawing elements, layers, and blocks. It handles the export process and communication with the API.

    Key responsibilities:

    • Managing elements, layers, and blocks
    • Handling export settings (format, version)
    • Coordinating API communication
  • Elements

    Individual drawing entities like circles, lines, text, etc. Each element inherits from the base Element class.

    Common elements include:

    • Geometric elements: Line, Circle, Arc, Polyline
    • Text elements: Text, MultilineText
    • Dimensioning elements: LinearDim, AngularDim
    • Complex elements: BlockReference, AttributeDefinition
  • Layers

    Organizational structures for grouping elements, controlling their visibility, color, and other properties.

    Layer features:

    • Property inheritance (color, line type, weight)
    • Visibility control
    • Organization and grouping
  • BlockDefinition

    A reusable collection of elements grouped under a name, serving as a template for BlockReference instances.

    Block features:

    • Reusability across drawings
    • Attribute support
    • Property inheritance
  • BlockReference

    An instance of a BlockDefinition inserted into the drawing, with its own position, rotation, scale, and attribute values.

    Instance properties:

    • Position and orientation
    • Scale factors
    • Attribute values

What's Next?

Now that you understand the basic concepts, you can: