C2 - Drawing Legends
C2 - Drawing Legends
Script Family
Series C - Plan Production
Purpose
Automatically places drawing legends within the title block by summarising features plotted in the drawing.
When to Use
Use C2 during final plan production to generate a legend block below the LEGENDS : text object in the title block.
Inputs
- Legend Location, selected by choosing the
LEGENDS :text object. - Additional Feature Codes, comma-separated.
- Placeholder Legends count.
- Use Standard Legend Set toggle.
- Legend Items per Column.
- Optional specific legends: Artificial Slope, Contour Line, Level Point, Survey Control.
Outputs
- Drawing legend placed below the selected
LEGENDS :title block text. - Optional placeholders and multi-column legend layout.
Workflow Summary
- Select the target legend location in the title block.
- Add optional Feature Codes where manual inclusion is required.
- Add placeholder legends if custom legend items will be edited later.
- Optionally use the predefined standard legend set.
- Configure column layout and optional specific legends.
- Run the script to generate the legend.
The manual notes that existing legends should be manually deleted before running the script again.
Related HAPI Concepts
Related File Formats
None directly.
Reverse-Engineering Notes
When reverse-engineering this Dynamo graph, identify:
- How plotted features are detected for legend summarisation.
- How Additional Feature Codes are parsed.
- How placeholder legends are inserted.
- How standard legend set overrides drawing-derived content.
- How column splitting is calculated.
- How optional legends are inserted.
Source Basis
- Primary source:
HAPI User Manual.pdf, Section 2.5.2. - This note is a manual-facing script overview, not a PythonNet3 implementation specification.
Open Questions
- Confirm whether legend resource definitions come from a DWT, JSON, block library, or a mixture.