Style Code Input Mechanisms
Style Code Input Mechanisms
Purpose
This note defines how Style Codes enter the HAPI pipeline.
Source Priority
- HAPI User Manual.pdf
- HAPI Quick Start Guide.pdf
- Point Code and Style Code.md
- File Format - CSV File.md
Input Mechanism 1: Raw Description Entry
The Style Code may be appended directly to the Raw Description of a COGO Point.
Syntax Rule
There must be exactly one space between Point Code and Style Code.
PointCode StyleCode
Examples:
| Raw Description | Meaning |
|---|---|
SP TSP-TRI | Sign Pole with triangular traffic sign style. |
TE T01:12.0,3.0,0.5 | Tree with number, height, spread, and DBH. |
FH HD-TKM | Fire Hydrant with selected style keys. |
Input Mechanism 2: Dynamo Player Interface
If the Style Code is not present in the Raw Description, users may provide style keys through script input fields in Dynamo Player.
This mechanism applies a uniform style definition to the active selection set or script input scope.
ECM-Ready CSV Input
The ECM-ready CSV format separates Point Code and Style Code into two columns, then concatenates them into Raw Description before drafting.
| Column Index | Field |
|---|---|
[5] | Base Point Code |
[6] | Style Code / metadata |
Concatenation Rule
If [6] contains valid text:
RawDescription = BasePointCode + " " + StyleCode
Example:
TE + T01:5.2,2.3,0.20 → TE T01:5.2,2.3,0.20
Trailing Space Rule
If [6] is missing, blank, or null, do not append a space.
Correct:
TE
Incorrect:
TE
Trailing spaces may corrupt Civil 3D Description Key behaviour and should be avoided.
CSV Parser Requirement
Do not parse ECM-ready CSV files with simple string splitting if Style Codes may contain commas.
Tree data such as the following must be preserved as one field:
"T01:5.2,2.3,0.20"
Use a real CSV parser such as Python's csv module with quote handling.
Implementation Notes
Preferred planned functions:
SplitRawDescriptionConcatenateRawDescriptionParseStyleCodeBuildSurveyRecordFromSeedDetectHeaderRow
Recommended ingestion sequence:
Read source row
↓
Build raw point/style tokens
↓
Concatenate Raw Description if needed
↓
Parse Point Code
↓
Resolve Feature Code and Feature Type
↓
Parse Style Code
↓
Build SurveyRecord
Related Notes
Open Questions
- Confirm whether Dynamo Player style overrides should supersede existing Raw Description Style Codes or only fill blanks.