Pipes2SurfacesProfilesElevationTool

XAML code:

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:src="clr-namespace:Autodesk.Windows;assembly=AdWindows">
    
<src:RibbonToolTip x:Key="Pipes2SurfacesProfilesElevationTool">
<src:RibbonToolTip.ExpandedContent>
<StackPanel>
<TextBlock Background="AntiqueWhite" TextAlignment="Left">
<Bold>Function Syntax: Command</Bold>
<LineBreak/>
<Bold>Version: 1 Date: 14.11.2025</Bold>
<LineBreak/>
<LineBreak/>
<Hyperlink>WEB</Hyperlink>
<LineBreak/>
<Bold>Description</Bold><LineBreak/>
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.<LineBreak/>
<LineBreak/>

<Bold>Key Features</Bold><LineBreak/>
• <Bold Foreground="DarkRed">Interactive DCL Interface</Bold> containing multiple grouped sections for: Surfaces, Profiles, Pipes from Model space and Pipes from Profile view.<LineBreak/>
• Surfaces and Profiles are listed vertically, each with <Bold Foreground="DarkRed">individual checkboxes</Bold>.<LineBreak/>
• All Surfaces and all Profiles are initially <Bold Foreground="DarkRed">unchecked</Bold> to ensure intentional selection.<LineBreak/>
• Pipes from both Model space and Profile view are automatically <Bold Foreground="DarkRed">checked</Bold> once added.<LineBreak/>
• A unified <Bold Foreground="Red">Select Pipes</Bold> button allows multi selection of pipes from Model space and Profile views.<LineBreak/>
• Automatic detection and mapping of <Bold Foreground="DarkRed">AeccDbGraphProfileNetworkPart</Bold> to the underlying model pipe using <Bold Foreground="Red">GetModelNetworkPart</Bold>.<LineBreak/>
• Ability to select Surfaces and Profiles directly from the drawing, automatically checking their corresponding items in the dialog.<LineBreak/>
<LineBreak/>

<Bold>Batch Selection Tools</Bold><LineBreak/>
• <Bold Foreground="DarkRed">Select All</Bold> and <Bold Foreground="DarkRed">Select None</Bold> buttons for Surfaces.<LineBreak/>
• <Bold Foreground="DarkRed">Select All</Bold> and <Bold Foreground="DarkRed">Select None</Bold> buttons for Profiles.<LineBreak/>
• <Bold Foreground="Red">Model: All</Bold> and <Bold Foreground="Red">Model: None</Bold> for pipes in Model space.<LineBreak/>
• <Bold Foreground="Red">Profile: All</Bold> and <Bold Foreground="Red">Profile: None</Bold> for pipes from Profile view.<LineBreak/>
<LineBreak/>

<Bold>Elevation Offset Control</Bold><LineBreak/>
• Separate numeric fields for:<LineBreak/>
  – <Bold Foreground="DarkRed">Surface elevation offset</Bold><LineBreak/>
  – <Bold Foreground="DarkRed">Profile elevation offset</Bold><LineBreak/>
• Each offset is applied independently to the corresponding elevation source.<LineBreak/>
<LineBreak/>

<Bold>Elevation Calculation Logic</Bold><LineBreak/>
• For each pipe the program attempts to determine elevation from a <Bold Foreground="DarkRed">Profile</Bold> first.<LineBreak/>
• If profile elev cannot be evaluated (e.g. pipe is not on that alignment), it falls back to the first valid <Bold Foreground="Red">TIN Surface</Bold> elevation found.<LineBreak/>
• Final pipe elevation is computed as:<LineBreak/>
  <Bold Foreground="DarkRed">profile elev or surface elev</Bold> plus <Bold Foreground="DarkRed">offset</Bold> plus <Bold Foreground="DarkRed">half internal diameter</Bold>.<LineBreak/>
<LineBreak/>

<Bold>Real Time Elevation Update</Bold><LineBreak/>
• The <Bold Foreground="Red">Apply</Bold> button performs the full elevation calculation immediately.<LineBreak/>
• The dialog remains open so the user can tweak values and reapply repeatedly.<LineBreak/>
• A <Bold Foreground="DarkRed">REGEN</Bold> command is issued automatically so changes are instantly visible.<LineBreak/>
<LineBreak/>

<Bold>Final Execution Commands</Bold><LineBreak/>
• Clicking <Bold Foreground="Red">OK</Bold>:<LineBreak/>
  – Applies elevations<LineBreak/>
  – Closes the dialog<LineBreak/>
• Clicking <Bold Foreground="DarkRed">Cancel</Bold>:<LineBreak/>
  – Closes the dialog without modification<LineBreak/>
<LineBreak/>

<Bold>Supported Civil 3D Entities</Bold><LineBreak/>
• AeccDbPipe (Model space pipe)<LineBreak/>
• AeccDbGraphProfileNetworkPart (Profile view pipe representation)<LineBreak/>
• AeccDbTinSurface (TIN Surfaces)<LineBreak/>
• AeccDbVAlignmentProfile (Profiles under Alignments)<LineBreak/>
<LineBreak/>

<Bold>Important Functions</Bold><LineBreak/>
• <Italic Foreground="DarkRed">PipeSurf-AddPipesFromDrawing</Italic> – Detects and adds pipes.<LineBreak/>
• <Italic Foreground="Red">SetPipeInvertsToElevSources</Italic> – Core engine that calculates elevations from Profiles and Surfaces.<LineBreak/>
• <Italic Foreground="DarkRed">PipeSurf-ApplyCurrent</Italic> – Updates pipes and performs REGEN.<LineBreak/>
• <Italic Foreground="Red">PipeSurf-ShowMainDialog</Italic> – Manages the dynamic DCL interface.<LineBreak/>
• <Italic Foreground="DarkRed">c:PipeToSurface</Italic> – Main user command.<LineBreak/>
<LineBreak/>

<Bold>User Workflow Summary</Bold><LineBreak/>
1. Run <Bold Foreground="DarkRed">PipeToSurface</Bold> command.<LineBreak/>
2. Select and check desired Surfaces and Profiles (manual or drawing selection).<LineBreak/>
3. Select pipes using <Bold Foreground="Red">Select Pipes</Bold> button.<LineBreak/>
4. Adjust Surface and Profile offsets.<LineBreak/>
5. Preview results using <Bold Foreground="DarkRed">Apply</Bold>.<LineBreak/>
6. Confirm changes using <Bold Foreground="Red">OK</Bold> or discard using Cancel.<LineBreak/>
<LineBreak/>

<Bold>Notes</Bold><LineBreak/>
• Section view pipes (AeccDbSectionPipeNetwork) are not supported, and are safely ignored.<LineBreak/>
• The routine ensures only valid pipes are modified.<LineBreak/>
<LineBreak/>


</TextBlock>
            
<Grid>
<Image Source="PNG" Stretch="Uniform"/>
</Grid>

<Grid>
<MediaElement
 Source="GIF"
 Stretch="Uniform"
 Visibility="Visible"/>
 </Grid>

</StackPanel>
</src:RibbonToolTip.ExpandedContent>
</src:RibbonToolTip>
</ResourceDictionary>



Page Tag: 🏷️ C3D_tools

  • Pipes2SurfacesProfilesElevationTool

    XAML code: Expand Code ↓ Select Code Copy Code <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:src="clr-namespace:Autodesk.Windows;assembly=AdWindows"> <src:RibbonToolTip x:Key="Pipes2SurfacesProfilesElevationTool"> <src:RibbonToolTip.ExpandedContent> <StackPanel> <TextBlock Background="AntiqueWhite" TextAlignment="Left"> <Bold>Function Syntax: Command</Bold> <LineBreak/> <Bold>Version: 1 Date: 14.11.2025</Bold> <LineBreak/> <LineBreak/> <Hyperlink>WEB</Hyperlink> <LineBreak/> <Bold>Description</Bold><LineBreak/> This AutoLISP program provides an advanced interface for adjusting Civil 3D pipe elevations based on TIN Surfaces and Profiles. It allows the…

  • MH2SurfacesProfilesElevationTool

    XAML code: Expand Code ↓ Select Code Copy Code <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:src="clr-namespace:Autodesk.Windows;assembly=AdWindows"> <src:RibbonToolTip x:Key="MH2SurfacesProfilesElevationTool"> <src:RibbonToolTip.ExpandedContent> <StackPanel> <TextBlock Background="AntiqueWhite" TextAlignment="MH2SurfacesProfilesElevationTool"> <Bold>Function Syntax: MH2SurfacesProfilesElevationTool</Bold> <LineBreak/> <Bold>Version: 1 Date: 14.11.2025</Bold> <LineBreak/> <LineBreak/> <Hyperlink>WEB</Hyperlink> <LineBreak/> <div class="bgc-Sort-Description"> <span class="txt-bold">Short description</span><span class="LineBreak"></span> This LISP adjusts Civil 3D manhole structures to match selected TIN surfaces and or profiles using elevation…

  • MH2SurfacesProfilesElevationTool_vs.01

    Short description Sort / Purpose: Civil 3D utility to set structure (manhole) elevations based on TIN Surfaces and/or Profiles, using a scrollable dialog with filters. • Scope: Works with AeccDbStructure and profile-view network parts, using profiles or surfaces as elevation sources, with separate offsets. • Priority: For each manhole, it tries Profiles first; if no…

  • MHPipes2SurfacesProfilesElevationTool_vs.01

    Short description Sort / Purpose: A pipe-only shortcut command that still launches the same full UI. User may ignore manhole lists if not needed. Type: Shortcut alias to the master interface Scope: Provides access to all pipe-related elevations Goal: Simpler entry for users working only with pipes Sort / Purpose: A pipe-only shortcut command that…

  • MH2SurfacesProfilesElevationTool_vs.00

    Short description Short description This LISP adjusts Civil 3D manhole structures so their rim elevations follow selected TIN surfaces or profiles, with elevation offsets, batch selection and a dialog that supports live Apply preview and final confirmation. Command: Main command • MHPipes2SurfacesProfilesElevationTool – opens the manhole elevation adjustment dialog and runs the tool. Description: What…

  • Pipes2SurfacesProfilesElevationTool_vs.00

    Short description Short description This LISP lets the user align Civil 3D pipes to chosen TIN surfaces and or profiles using elevation offsets, with a dialog that supports multi selection, live Apply preview and final OK or Cancel confirmation. Command: Main command • PipeToSurface – launches the dialog and controls the entire workflow. Description: What…

  • CopyC3DEntitiesToClipboard

    Short description 📋 CopyC3DEntitiesToClipboard.lsp is an AutoCAD Civil 3D AutoLISP clipboard utility that duplicates selected entities, explodes the temporary copies, extracts generated TEXT and MTEXT values, copies the cleaned text to the Windows clipboard, and erases the temporary exploded geometry. It helps Civil 3D users copy visible label information quickly without intentionally exploding the original…

  • C3D_Corridor_003

    Short description Comming soon … Command: Comming soon … Description: Comming soon … Helper function: (if any)​ Comming soon … Functionalities: Comming soon … Result: Comming soon … Images, animations etc. Lisp code: Expand Code ⬇ Select Code Copy Code Comming soon … Share this page: