Tools
Activate length, area, count, snapping, and navigation fitting measurement actions.
Measurement tools are activated programmatically using the tools API surface on the viewer instance.
Call the set method with the desired measurement action and await the promise resolution to ensure the Canvas has initialized drawing surfaces.
- Ready State Requirement: Ensure the document is loaded and
viewer.ready()has resolved before enabling measurement modes. - Promise Resolution: Navigation and tools APIs resolve as soon as Canvas confirms tool control setup.
Activate measurement tools and customize behaviors using these examples:
Activate length measurement
Toggle snap behavior
Clear active measurement tools
Pass any of these action keys to viewer.tools.set:
- `MEASURE_LENGTH`: Distance measurement between two selected points.
- `MEASURE_AREA`: Region area measurement calculation.
- `MEASURE_PATH`: Multi-segmented continuous distance tracking.
- `MEASURE_ARC`: Three-point arc circumference and radius tracking.
- `MEASURE_ANGLE_CCLOCKWISE`: Angular rotation measurement.
- `MEASURE_RECTANGULAR_AREA`: Fast rectangle area calculation.
- `COUNT`: Location count point markers.
- `SNAP`: Vector snap override toggle.
Copy these project setup files to configure mounting, measurement buttons, and tool clearing:
Trigger length, area, snap, and fit-view actions inside a React component:
Trigger length, area, snap, and fit-view actions inside a Vue composition component:
Trigger length, area, snap, and fit-view actions inside an Angular component:
Test measurement tools in real-time.
Interactive Workbench
Live Canvas Preview
Launch the interactive preview to explore the Canvas capabilities. Use the dashboard within the modal to test different tools and configurations.
Continue with related measurement workflows and API references.
- Calibration: Scale Reference
- Creation: Measurement Created
- Save: Save Measurements
- Technical: API Reference
