How to add drawing issue management to a web application.
Let users place an issue marker on a drawing in Rasterex Canvas, then create and manage the linked task in your application—with your own assignees, priorities, due dates, permissions and project records.
Rasterex technical guide
Use a Canvas marker as the bridge to a host-owned issue task.
Rasterex provides the marker tool, annotation events and marker selection. Your host application provides the issue queue, editor, status model, assignment rules, persistence and authorization. The annotation ID is the link between them.
This workflow starts after the drawing is open. Follow the embedded CAD viewer guide first if the Viewer SDK lifecycle is not in place.
Preserve a clear marker-to-task relationship.
1. Place a marker
Activate the documented ellipse action only when the drawing is ready, then let the user place the marker on Canvas.
2. Capture task details
Open the host editor after Canvas returns the marker ID. Collect the task fields and policies that belong to your product.
3. Link both directions
Persist the annotation ID with the host issue. Task-list selection selects the marker; Canvas marker selection opens the matching task.
Place, identify, link.
The marker and annotation calls are documented by Rasterex. Your host-side task API, permissions and data model remain application-specific.
Activate the documented issue-marker action
01// Run after mount(), ready() and documents.open().02const result = await viewer.tools.set({03 action: "SHAPE_ELLIPSE",04 enabled: true,05 style: issueMarkerStyle,06});07 08if (result?.success === false) {09 throw new Error(result.error ?? "Issue marker tool failed.");10}11 12// The next marker a user places creates an annotation event.Connect created and selected markers to host tasks
01const stopCreated = viewer.annotations.on("created", (event) => {02 const annotationId = event.guid;03 if (!annotationId) return;04 05 // Open host UI to collect task details. Save annotationId with that host issue record.06 setPendingAnnotationId(annotationId);07 setIssueEditorOpen(true);08});09 10const stopSelected = viewer.annotations.on("selected", (event) => {11 // Find the host issue whose annotationId matches event.guid, then open its editor.12 openMatchingIssue(event.guid);13});14 15// Selecting an issue in the host task list selects its Canvas marker.16viewer.annotations.select({ guid: issue.annotationId });17 18// Cancel a newly placed marker before saving its host task.19viewer.annotations.delete({ guid: pendingAnnotationId });20viewer.tools.clear();Validate the link, the cancellation path and both selection directions.
- The drawing is open before Add issue becomes available.
- Add issue activates the documented SHAPE_ELLIPSE action with the host product’s chosen marker styling.
- The task editor opens only after the created annotation event returns a marker ID.
- Saving creates a host issue linked to the marker annotation ID.
- Canceling a new marker deletes that pending marker and clears the active tool; canceling an existing task edit does not delete its marker.
- Selecting a host task selects its Canvas marker, and selecting a Canvas marker opens the matching host task.
- Resolving or reopening a host task leaves its drawing marker in place.
- Annotation listeners and the Viewer instance are cleaned up when the screen unmounts.
Issue workflow answers.
How do I link a drawing issue to a Canvas marker?
Activate the documented SHAPE_ELLIPSE annotation action, then wait for viewer.annotations.on("created", callback) to supply the marker ID. Save that annotation ID alongside the issue-task record in the host application.
When should an issue editor open?
Open the editor only after the created annotation event returns a marker ID, or when the user selects an existing task. Do not create a host issue record before a marker identifier is available.
What should happen when a user cancels a new issue marker?
For a new marker, delete the pending annotation with viewer.annotations.delete({ guid }) and clear the active tool with viewer.tools.clear(). Do not delete a marker when canceling edits to an existing issue task.
How does a task-list selection connect back to the drawing?
Select the saved marker with viewer.annotations.select({ guid: issue.annotationId }). In the other direction, listen for selected annotation events and open the matching host issue task when its annotation ID is selected in Canvas.
Define the host issue record before expanding the workflow.
Decide what the annotation ID connects to—an issue, RFI, punch item or approval—and validate the complete marker-to-record workflow with real permissions and drawing data.
