AssemblyLabel

Short description

πŸš€ Assembly MText Label is an AutoCAD Civil 3D labeling utility that creates a dynamic MText field label linked directly to a selected Civil 3D Assembly object.

πŸ“Œ The main benefit is faster Assembly annotation, fewer manual text edits, and automatic label updates when the Assembly name changes.

Command:

🧰 The user starts the tool, selects a Civil 3D Assembly in the drawing, then picks an insertion point for the generated label.

πŸ”΄ The exact command name is not specified in the provided code description, but the workflow is built around Assembly selection, ObjectId retrieval, FIELD expression creation, and MText insertion.

πŸ—οΈ Target platform: AutoCAD Civil 3D, using AutoCAD database objects, Civil 3D Assembly objects, dynamic fields, and annotation text.

Description:

Comming soon …

Helper function: (if any)​

  • πŸ” Assembly selection logic – prompts the user to choose a valid Civil 3D Assembly entity from the active drawing.
  • 🧩 ObjectId binding – retrieves the selected entity ObjectId so the generated field points to the correct drawing object.
  • 🧠 FIELD expression builder – creates an AutoCAD FIELD expression linked to the Assembly Name property, with the option to adapt the expression to DisplayName if required.
  • πŸ“Œ Insertion point workflow – asks the user to pick the exact location where the Assembly label should be placed.
  • πŸ“ MText creation – creates an MText database object and assigns the generated field expression as its text content.
  • πŸ“ Automatic text sizing – reads the current TEXTSIZE system variable and applies a practical fallback height when needed.
  • πŸ”„ Dynamic update behavior – uses AutoCAD field evaluation so the label can reflect Assembly property changes after field updates.

Functionalities:

  • πŸš€ Create Civil 3D Assembly labels – quickly places an Assembly name label without typing the text manually.
  • πŸ” Select an Assembly object – lets the user choose the Civil 3D Assembly directly in the drawing.
  • 🧩 Link label to ObjectId – binds the text field to the real selected object instead of using static text.
  • πŸ“ Generate dynamic MText – creates an MText label that contains a live AutoCAD field expression.
  • πŸ“Œ Pick custom placement point – allows precise manual placement of the annotation label.
  • πŸ“ Apply automatic formatting – uses TEXTSIZE for readable text height and consistent drawing annotation.
  • πŸ”„ Update when Assembly name changes – supports dynamic field-based updates for better Civil 3D annotation control.
  • πŸ”’ Reduce manual drafting errors – prevents mismatches between Assembly names and typed labels.

Result:

βœ… The final result is a productivity-focused AutoCAD Civil 3D Assembly labeling tool that creates a dynamic MText field label connected to the selected Assembly object.

🟒 It improves drawing accuracy, speeds up annotation workflows, reduces manual text maintenance, and helps Civil 3D users keep Assembly labels synchronized with object properties.

Images, animations etc.

Pixel

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="AssemblyLabel">
<src:RibbonToolTip.ExpandedContent>
<StackPanel>
<TextBlock Background="AntiqueWhite" TextAlignment="Left">
<Bold>Function Syntax: AssemblyLabel</Bold>
<LineBreak/>
<Bold>Version: 1 Date: 25.09.2025</Bold>
<LineBreak/>
<LineBreak/>
<Hyperlink>AI</Hyperlink>
<LineBreak/>

<Bold>Description</Bold><LineBreak/>
This program allows the user to create an <Bold><Span Foreground="DarkRed">MText label</Span></Bold> that is automatically linked to a selected <Bold><Span Foreground="DarkRed">Civil 3D Assembly</Span></Bold> object.<LineBreak/>

<Bold>Main actions:</Bold><LineBreak/>
β€’ The program prompts the user to <Bold><Span Foreground="DarkRed">select an Assembly object</Span></Bold> in the drawing.<LineBreak/>
β€’ It retrieves the <Bold><Span Foreground="DarkRed">ObjectId</Span></Bold> of the selected entity and uses it to build a <Bold><Span Foreground="DarkRed">FIELD expression</Span></Bold>.<LineBreak/>
β€’ The <Bold><Span Foreground="DarkRed">FIELD</Span></Bold> is bound to the Assembly’s <Bold><Span Foreground="DarkRed">Name</Span></Bold> property (or can be adjusted to <Bold><Span Foreground="DarkRed">DisplayName</Span></Bold>).<LineBreak/>
β€’ The user is prompted to pick an <Bold><Span Foreground="DarkRed">insertion point</Span></Bold> for the label.<LineBreak/>
β€’ An <Bold><Span Foreground="DarkRed">MText object</Span></Bold> is created at that location with the FIELD as its content.<LineBreak/>
β€’ The <Bold><Span Foreground="DarkRed">text height</Span></Bold> is set automatically based on the current <Bold><Span Foreground="DarkRed">TEXTSIZE</Span></Bold> system variable (or a fallback value).<LineBreak/>
β€’ The label will <Bold><Span Foreground="DarkRed">update dynamically</Span></Bold> if the Assembly name changes.<LineBreak/>

<Bold>Functionalities provided:</Bold><LineBreak/>
β€’ <Span Foreground="Red">Entity selection</Span> β†’ choose the Civil 3D Assembly.<LineBreak/>
β€’ <Span Foreground="Red">ObjectId retrieval</Span> β†’ ensures correct binding in FIELD expression.<LineBreak/>
β€’ <Span Foreground="Red">FIELD generation</Span> β†’ links label to Assembly property.<LineBreak/>
β€’ <Span Foreground="Red">Point placement</Span> β†’ user defines label location.<LineBreak/>
β€’ <Span Foreground="Red">MText creation</Span> β†’ adds FIELD as dynamic text.<LineBreak/>
β€’ <Span Foreground="Red">Automatic formatting</Span> β†’ height and width handled for readability.<LineBreak/>
β€’ <Span Foreground="Red">Dynamic updates</Span> β†’ text reflects property changes automatically.<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>



Additional info:

Share this page:

Page Tag: 🏷️ C3D_Assembly_menu

  • AssemblyLabel

    Short descriptionπŸš€ Assembly MText Label is an AutoCAD Civil 3D labeling utility that creates a dynamic MText field label linked directly to a selected Civil 3D Assembly object. πŸ“Œ The main benefit is faster Assembly annotation, fewer manual text edits, and automatic label updates when the Assembly name changes. Command:🧰 The user starts the tool,…