Measurement Created
Listen for new data when a measurement is completed.
The `annotationCreated` event is emitted by the viewer immediately after a user completes a measurement action on the canvas. This allows the host application to persist the data or update the local state without manual save requests.
- Automatic Trigger: Fires as soon as the last point of a measurement is placed.
- Raw Data: Contains full geometric and styling properties.
- Event Object: Includes a unique GUID for tracking.
Attach a message listener to the window to intercept measurement data.
Listen for new data
Access DimText
The creation of a measurement follows a specific sequence from user interaction to host notification.
1. User Completes Action
The user finishes drawing a length, area, or count on the canvas.
2. Viewer Returns Data
The viewer broadcasts the annotationCreated message to the host window.
3. Host Listens
The host application receives the message and processes the data.
The `payload` object contains a unique identifier and the complete state of the newly created measurement.
A typical pattern is to auto-save or update a list of measurements when the creation event fires.
Continue with related measurement workflows and API references.
- Save: Save Measurements
- Selection: Select Measurement
- Delete: Delete Measurement
- Technical: API Reference
