Function Syntax: MH2SurfacesProfilesElevationTool Version: 1 Date: 14.11.2025 WEB
Short description This LISP adjusts Civil 3D manhole structures to match selected TIN surfaces and or profiles using elevation offsets, with an interactive dialog for selecting surfaces, profiles and manholes and applying changes live.
Main commandMHtoSurface – opens the manhole elevation adjustment dialog and controls the entire workflow.
What this program does • Lists all TIN surfaces and all profiles in the drawing and lets the user check which ones will control manhole elevations. • Allows selection of manholes in Model space and manholes in Profile view and shows them in two groups with checkboxes. • For every checked manhole tries to get elevation from the selected profiles first then falls back to selected TIN surfaces if profile elevation is not valid at that position. • Applies independent numeric offsets for surface elevation and profile elevation before setting the final manhole rim level. • Updates manhole RimElevation and the Z value of the structure Position so the 3D graphics match the design elevation.
Important helper logicMH-AddStructuresFromDrawing – inspects user selection and adds AeccDbStructure objects and structures mapped from profile view network parts into the lists.MH-SelectSurfacesFromDrawing – enables graphical selection of TIN surfaces and auto checks the matching surface items in the dialog.MH-SelectProfilesFromDrawing – enables graphical selection of profiles and auto checks their entries in the profile list.MH-SetStructureElevToSources – core function that finds elevation at the manhole XY from profiles or surfaces and sets the rim elevation with offsets.MH-ApplyCurrent – applies current selections and offsets to all chosen manholes and runs a REGEN so the vertical change is visible immediately.
FunctionalitiesSurface selection area – Displays all TIN surfaces with checkboxes, initially unchecked.Select Surfaces button lets the user pick surfaces in the drawing and auto checks their entries.Select All and Select None toggle all surface checkboxes at once.Profile selection area – Lists all profiles found under alignments with checkboxes, initially unchecked.Select Profiles button allows picking profiles from profile views and auto checks them.Select All and Select None for profiles.Manholes (Model space) list – Shows each selected AeccDbStructure from plan view as “DisplayName – PartSizeName” one below another. – Checkboxes control which model manholes are active for elevation adjustment.Model: All and Model: None buttons select or deselect all model manholes.Manholes (Profile view) list – Shows manholes that were selected through profile view network graphics and mapped back to their model structures. – Checkboxes control which of these profile based manholes are processed.Profile: All and Profile: None select or deselect all profile view manholes.Select Manholes button – Wide button that spans beneath both manhole columns and allows repeated selection of structures from plan and profile views.Elevation offset controls – Edit box for Surface elevation offset applied when elevations come from TIN surfaces. – Edit box for Profile elevation offset applied when elevations come from profiles.Source priority – For every manhole the routine first projects its XY to each checked alignment and tries to get profile elevation at that station. – If no valid profile elevation is found, the routine queries each checked surface for elevation at the same XY until one returns a valid value.Control buttonsApply adjusts all checked manholes using current selections and offsets, regenerates the drawing and keeps the dialog open.OK performs the same adjustment then closes the dialog.Cancel closes the dialog without running another adjustment.
Result • Checked manholes are set to new rim elevations derived from either the chosen profiles or TIN surfaces plus the specified offsets. • Manholes selected from profile views are correctly mapped back to their model structures before elevation is changed. • The designer can iteratively tune offsets and selections with Apply until the network fits the required profiles and surfaces, then confirm with OK or exit with Cancel.