Global Configuration
Global Configuration
Purpose
This note explains the role of GlobalConfiguration.json in the HAPI PythonNet3/Civil 3D drafting engine.
Source Priority
- GlobalConfiguration.json
- Global Configuration Specification.md
- Feature Catalogue Specification.md
- HAPI User Manual.pdf
Definition
GlobalConfiguration.json defines project-wide constants, default Civil 3D style names, resource filenames, folder paths, and mathematical thresholds used by the HAPI drafting engine.
It provides fallback rules when the Feature_Catalogue does not supply more specific behaviour.
Resource and Path Fields
| Field | Current Value | Meaning |
|---|---|---|
CSWPAgentCode | HSD | Agent code used in the current deployment. |
WkEnvRootDirectoryPath | X:\HAPI-Core\Payload\ | Root payload directory. |
ConfigDirectoryPath | src\Config\ | Config folder. |
TemplatesDirectoryPath | src\Templates\ | Template folder. |
ObjectsDirectoryPath | src\StylesObjects\ | ECM object source folder. |
StylesDirectoryPath | src\StylesJSON\ | Style JSON folder. |
SymbolResourcesFilename | RES80 [Symbol Resources].DWT | Symbol resource drawing/template. |
LegendResourcesFilename | RES46 [Legend Resources].DWT | Legend resource drawing/template. |
Mathematical and Drafting Thresholds
| Field | Current Value | Meaning |
|---|---|---|
FriendlyNeighborhoodThreshould | 0.25 | Proximity tolerance for polygon closure logic. |
LinestyleAnnotationInterval | 50 | Base interval for distributing line annotations. |
NurbsCurveToPolyCurvePrecision | 0.5 | Tessellation precision for converting curves into linear vertex lists. |
DefaultSymbolArbitraryDimension | 1.5 | Fallback dimension for arbitrary generated symbols or one-point rectangle cases. |
Note:
FriendlyNeighborhoodThreshouldpreserves the current configuration spelling. Do not silently rename it in code unless a migration layer is explicitly implemented.
COGO Point Marker Styles
| Field | Current Value | Meaning |
|---|---|---|
DefaultLevelStyleName | Standard | Default visible point marker style. |
DefaultSuppressStyleName | Suppressed | Suppressed point style. |
DefaultLevelNotReqStyleName | Level Not Required | Marker style when level display is not required. |
Datum Dictionary / Label Fallbacks
| Field | Current Value | Meaning |
|---|---|---|
DefaultLevelLabelName | HKPD | Spot Level | Standard spot level label. |
DefaultInvertLevelLabelName | HKPD | Invert Level | Invert level label. |
DefaultCrownLevelLabelName | HKPD | Crown Level | Crown level label. |
DefaultDepthLabelName | HKCD | Chart Depth | Bathymetry / depth label. |
DefaultFeatureCurveLabelName | Generic | Tag Only | Default feature curve label. |
Relationship to Feature Catalogue
The Feature_Catalogue defines feature-specific rules. Global Configuration defines fallbacks and global constants.
Example relationship:
SurveyRecord.FeatureCode
↓
FeatureCatalogue entry
↓
Specific style / label / routing field
↓
Fallback to GlobalConfiguration when missing or globally overridden
Business Rules
- Global Configuration should not replace feature-specific catalogue data.
- Use Global Configuration as fallback, not as hard-coded constants in scripts.
- Preserve current field names unless a migration strategy is explicitly defined.
- Mathematical thresholds should be documented because they affect geometric behaviour and test expectations.
Implementation Notes
Preferred planned functions:
LoadGlobalConfigurationResolveDefaultPointStyleResolveDefaultLabelStyleResolveDatumLabelStyleGetFriendlyNeighborhoodThresholdGetCurveTessellationPrecision
Related Notes
Open Questions
- Confirm whether the misspelt field
FriendlyNeighborhoodThreshouldshould remain unchanged for backward compatibility or be migrated toFriendlyNeighborhoodThresholdwith alias support.