Documentation Index
Fetch the complete documentation index at: https://docs.speckle.systems/llms.txt
Use this file to discover all available pages before exploring further.
AutomationContext provides methods to attach structured annotations to objects, allowing automated analysis and validation workflows to provide meaningful feedback.
Object Annotations
Object annotations enable attaching different types of messages (errors, warnings, informational notes, and successes) to specific objects within an automation run. This helps in tracking issues, communicating insights, and guiding decision-making.Example
Annotation Types
| Type | Method | Use Case |
|---|---|---|
| Error | attach_error_to_objects() | Critical issues requiring immediate action |
| Warning | attach_warning_to_objects() | Potential concerns needing attention |
| Info | attach_info_to_objects() | General insights and analysis results |
| Success | attach_success_to_objects() | Positive outcomes or validation confirmations |
Metadata and Customisation
Annotations can be enriched with additional metadata to improve interpretability and visualization.Example
Gradient Visualization
Certain metadata keys affect how results are displayed in the model viewer:gradient: Bool: Enables gradient-based visualization.gradientValues: List[str]: Specifies values to apply to objects.
Best Practices
- Use the appropriate annotation type to convey severity accurately.
- Group related annotations into categories for better organization.
- Provide clear, actionable messages to aid decision-making.
- Include relevant object IDs to maintain traceability.
- Leverage metadata for richer annotations and better UI integration.