CogoPoints2Structures

Tags: 🏷️ C3D_Pipe_Network_menu, 🏷️ C3D_tools

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="CogoPoints2Structures">
<src:RibbonToolTip.ExpandedContent>
<StackPanel>
<TextBlock Background="AntiqueWhite" TextAlignment="Left">
<Bold>Function Syntax: CogoPoints2Structures</Bold>
<LineBreak/>
<Bold>Version: 1 Date: 04.12.2025</Bold>
<LineBreak/>
<LineBreak/>
<Hyperlink>AI</Hyperlink>
<LineBreak/>
<Bold>Description</Bold><LineBreak/>
This program allows the user to automatically create copies of a template Civil 3D Structure and place them at the locations of selected COGO Points, matching each structure’s Rim Elevation to the point’s Elevation.<LineBreak/><LineBreak/>

<Bold>Main Functionalities</Bold><LineBreak/>

• The user is prompted to select a template structure (<Bold><Run Foreground="DarkRed">AeccDbStructure</Run></Bold>).<LineBreak/>

• The routine validates that the selected object truly is an <Bold><Run Foreground="DarkRed">AeccDbStructure</Run></Bold>.<LineBreak/>

• The user then selects multiple COGO Points (<Bold><Run Foreground="DarkRed">AeccDbCogoPoint</Run></Bold>) to define where new structures will be placed.<LineBreak/>

• For each COGO Point, the routine performs the following actions:<LineBreak/>
   • Creates a copy of the template structure using <Bold><Run Foreground="Red">vla-Copy</Run></Bold>.<LineBreak/>
   • Retrieves the point's Location and Elevation using <Bold><Run Foreground="Red">vlax-get</Run></Bold>.<LineBreak/>
   • Moves the copied structure to the COGO Point using <Bold><Run Foreground="Red">SetLocation</Run></Bold>.<LineBreak/>
   • Sets the structure's RimElevation equal to the COGO Point's Elevation with <Bold><Run Foreground="Red">vlax-put</Run></Bold>.<LineBreak/>

• When complete, the routine reports the number of structures created.<LineBreak/><LineBreak/>

<Bold>Important Implementation Details</Bold><LineBreak/>

• COM is loaded using <Bold><Run Foreground="Red">vl-load-com</Run></Bold>.<LineBreak/>

• <Bold><Run Foreground="DarkRed">CMDECHO</Run></Bold> is temporarily disabled to keep the command line clean.<LineBreak/>

• A custom error handler restores settings and avoids abnormal termination.<LineBreak/>

• Only AeccDbStructure objects are accepted as templates.<LineBreak/>

• Only AECC_COGO_POINT objects are accepted for placement locations.<LineBreak/><LineBreak/>

<Bold>Workflow Summary</Bold><LineBreak/>

• User selects a template structure.<LineBreak/>
• User selects a set of COGO Points.<LineBreak/>
• The routine loops through all selected points.<LineBreak/>
• For each point:<LineBreak/>
   • Template is copied.<LineBreak/>
   • Copy is moved to point location.<LineBreak/>
   • Rim elevation is synchronized with COGO Point elevation.<LineBreak/>
• Confirmation message displays how many structures were created.<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>



0
Would love your thoughts, please comment.x
()
x