Modelspace

The modelspace contains the “real” world representation of the drawing subjects in real world units and is displayed in the tab called “Model” in CAD applications. The modelspace is always present and can’t be deleted.

The modelspace object is acquired by the method modelspace() of the Drawing class and new entities should be added to the modelspace by factory methods: Thematic Index of Layout Factory Methods.

This is a common idiom for creating a new document and acquiring the modelspace:

import ezdxf

doc = ezdxf.new()
msp = doc.modelspace()

The modelspace can have one or more rectangular areas called modelspace viewports. The modelspace viewports can be used for displaying different views of the modelspace from different locations of the modelspace or viewing directions. It is important to know that modelspace viewports (VPort) are not the same as paperspace viewport entities (Viewport).

See also