Function Syntax: Command Version: 1 Date: 14.11.2025 WEB Description This AutoLISP program provides an advanced interface for adjusting Civil 3D pipe elevations based on TIN Surfaces and Profiles. It allows the user to graphically select surfaces, profiles and pipes, apply different elevation offsets, and preview the results in real time without closing the dialog. Key FeaturesInteractive DCL Interface containing multiple grouped sections for: Surfaces, Profiles, Pipes from Model space and Pipes from Profile view. • Surfaces and Profiles are listed vertically, each with individual checkboxes. • All Surfaces and all Profiles are initially unchecked to ensure intentional selection. • Pipes from both Model space and Profile view are automatically checked once added. • A unified Select Pipes button allows multi selection of pipes from Model space and Profile views. • Automatic detection and mapping of AeccDbGraphProfileNetworkPart to the underlying model pipe using GetModelNetworkPart. • Ability to select Surfaces and Profiles directly from the drawing, automatically checking their corresponding items in the dialog. Batch Selection ToolsSelect All and Select None buttons for Surfaces.Select All and Select None buttons for Profiles.Model: All and Model: None for pipes in Model space.Profile: All and Profile: None for pipes from Profile view. Elevation Offset Control • Separate numeric fields for:Surface elevation offsetProfile elevation offset • Each offset is applied independently to the corresponding elevation source. Elevation Calculation Logic • For each pipe the program attempts to determine elevation from a Profile first. • If profile elev cannot be evaluated (e.g. pipe is not on that alignment), it falls back to the first valid TIN Surface elevation found. • Final pipe elevation is computed as: profile elev or surface elev plus offset plus half internal diameter. Real Time Elevation Update • The Apply button performs the full elevation calculation immediately. • The dialog remains open so the user can tweak values and reapply repeatedly. • A REGEN command is issued automatically so changes are instantly visible. Final Execution Commands • Clicking OK: – Applies elevations – Closes the dialog • Clicking Cancel: – Closes the dialog without modification Supported Civil 3D Entities • AeccDbPipe (Model space pipe) • AeccDbGraphProfileNetworkPart (Profile view pipe representation) • AeccDbTinSurface (TIN Surfaces) • AeccDbVAlignmentProfile (Profiles under Alignments) Important FunctionsPipeSurf-AddPipesFromDrawing – Detects and adds pipes.SetPipeInvertsToElevSources – Core engine that calculates elevations from Profiles and Surfaces.PipeSurf-ApplyCurrent – Updates pipes and performs REGEN.PipeSurf-ShowMainDialog – Manages the dynamic DCL interface.c:PipeToSurface – Main user command. User Workflow Summary 1. Run PipeToSurface command. 2. Select and check desired Surfaces and Profiles (manual or drawing selection). 3. Select pipes using Select Pipes button. 4. Adjust Surface and Profile offsets. 5. Preview results using Apply. 6. Confirm changes using OK or discard using Cancel. Notes • Section view pipes (AeccDbSectionPipeNetwork) are not supported, and are safely ignored. • The routine ensures only valid pipes are modified.