Represents a view on a drawing sheet.
Usually a view is a logical portion of the sheet, containing one of the literal views of the model (for example, top view, isometric view, or cutaway view). Following this idea, the view is defined by a position in the sheet and a scale (real-world model dimensions versus on-paper dimensions).
A view can contain any collection of drawing elements, but these elements are expected to form a logically self-contained group.
new View(
position?):View
Creates a view.
The provided position is copied.
Axis2d = ...
Position of the view in the owning sheet.
View
readonlyelements:Set<Element>
Elements contained in the view.
get id():
bigint
Returns the unique identifier of the object.
bigint
get numberOfElements():
number
Returns the number of elements in the view.
Use View.elements and elements.size instead.
number
get position():
Axis2d
Position of the view in the owning sheet.
set position(
position):void
Sets the position of the view in the owning sheet.
The value is copied from the provided axis.
Position of the view in the owning sheet.
void
get scale():
Ratio
Scale of the view.
set scale(
scale):void
Sets the scale of the view.
The value is copied from the provided ratio.
View scale.
void
get uuid():
`${string}-${string}-${string}-${string}-${string}`|null
UUID of the drawing view.
The value is null if the drawing view has no assigned UUID.
`${string}-${string}-${string}-${string}-${string}` | null
set uuid(
uuid):void
Sets the UUID of the drawing view.
`${string}-${string}-${string}-${string}-${string}` | null
UUID of the drawing view.
void
accept(
visitor):void
Accepts an element visitor.
Calls the visitor for each element in the view.
Element visitor to accept.
void
add(
element):void
Adds a drawing element to the view.
Drawing element to add.
void
Use View.elements and elements.add(element) instead.