Short description
🧰 SetupOverriteDimStyles is an AutoCAD and Civil 3D AutoLISP workspace manager that matches current Layer, Text Style, Dimension Style, MLeader Style, and Text Size from a selected object.
📊 It displays a 4-column DCL comparison matrix with current settings, current drawing quantities, selected-object settings, and selected-setting quantities.
Command:
🚀 Main command: SetupOverriteDimStyles
🖱️ The user first selects an object to use as the style source.
⚙️ The DCL dialog then lets the user choose which workspace settings to update: current layer, text style/text size, and dimension or MLeader style.
Description:
🧰 SetupOverriteDimStyles is an SEO-friendly AutoCAD property matching and drafting standards utility for setting current annotation and workspace styles from an existing drawing object.
📌 The routine reads current CLAYER, TEXTSTYLE, DIMSTYLE, and CMLEADERSTYLE values, then compares them with the layer and annotation styles extracted from the selected object.
📊 A dynamic DCL interface presents a 4-column matrix: current workspace settings, current quantities, selected object style/name, and selected quantities.
🧠 It supports MULTILEADER, LEADER, TEXT, MTEXT, and DIMENSION source entities, making it useful for Civil 3D production drawings, CAD standard enforcement, annotation cleanup, and rapid style switching.
Helper function: (if any)
🧩 bugfix-count-mleaders scans MULTILEADER entities and counts objects using a specified MLeader style name through ActiveX.
🧩 entget reads the selected object DXF data to determine entity type, layer, text style, dimension style, MLeader style, and text height when available.
🧩 ssget “X” database scans count matching layers, text styles, dimension styles, and MLeader styles across the drawing.
🧩 A temporary DCL file is written at runtime to build the 4-column Property Matching Workspace Manager dialog.
🧩 getcfg and setcfg are used to persist the dialog coordinate configuration under AppData/SetupOverriteDimStyles_Command.
🧩 The custom *error* handler unloads the dialog, deletes the temporary DCL file, restores CMDECHO, and restores the previous error handler.
Functionalities:
✅ Select an object and extract its relevant CAD standards properties.
✅ Compare current workspace settings against selected-object settings in a clear DCL matrix.
✅ Show quantity counts for current and selected Layer, Text Style, Dimension Style, and MLeader Style usage.
✅ Toggle whether to set the selected object layer current.
✅ Toggle whether to set the selected text style and text size current.
✅ Toggle whether to restore the selected dimension style and/or set the selected MLeader style current.
✅ Preserve toggle choices in session variables for repeated use.
✅ Wrap updates in an AutoCAD UNDO begin/end group.
Result:
📌 The active drawing workspace can be updated to match the selected object’s layer, text style, text size, dimension style, and MLeader style depending on enabled toggles.
📊 The user sees before/after-relevant counts before accepting the update.
🧹 Temporary DCL files are removed after the dialog closes.
Images, animations etc.
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="SetupOverriteDimStyles"> <src:RibbonToolTip.ExpandedContent> <StackPanel> <TextBlock Background="AntiqueWhite" TextAlignment="Left"> <Bold>Function Syntax: SetupOverriteDimStyles</Bold> <LineBreak/> <Bold>Version: 1.0 Date: 12.06.2026 06:44:56</Bold> <LineBreak/> <Hyperlink>https://www.cadtutor.net/forum/topic/4344-picking-dimension-to-set-dimstyle-properties/</Hyperlink> <LineBreak/> <Bold><Run Foreground="DodgerBlue">Description</Run></Bold><LineBreak/> <Run Foreground="White">🧰 SetupOverriteDimStyles is an AutoCAD and Civil 3D AutoLISP workspace manager that matches current Layer, Text Style, Dimension Style, MLeader Style, and Text Size from a selected object.</Run><LineBreak/> <Run Foreground="LimeGreen">📊 It displays a 4-column DCL comparison matrix with current settings, current drawing quantities, selected-object settings, and selected-setting quantities.</Run><LineBreak/> <LineBreak/> <Bold><Run Foreground="DodgerBlue">Function Syntax</Run></Bold><LineBreak/> <Run Foreground="White">🚀 Main command: SetupOverriteDimStyles</Run><LineBreak/> <Run Foreground="White">🖱️ The user first selects an object to use as the style source.</Run><LineBreak/> <Run Foreground="White">⚙️ The DCL dialog then lets the user choose which workspace settings to update: current layer, text style/text size, and dimension or MLeader style.</Run><LineBreak/> <LineBreak/> <Bold><Run Foreground="DodgerBlue">SEO Optimized Overview</Run></Bold><LineBreak/> <Run Foreground="White">🧰 SetupOverriteDimStyles is an SEO-friendly AutoCAD property matching and drafting standards utility for setting current annotation and workspace styles from an existing drawing object.</Run><LineBreak/> <Run Foreground="White">📌 The routine reads current CLAYER, TEXTSTYLE, DIMSTYLE, and CMLEADERSTYLE values, then compares them with the layer and annotation styles extracted from the selected object.</Run><LineBreak/> <Run Foreground="White">📊 A dynamic DCL interface presents a 4-column matrix: current workspace settings, current quantities, selected object style/name, and selected quantities.</Run><LineBreak/> <Run Foreground="White">🧠 It supports MULTILEADER, LEADER, TEXT, MTEXT, and DIMENSION source entities, making it useful for Civil 3D production drawings, CAD standard enforcement, annotation cleanup, and rapid style switching.</Run><LineBreak/> <LineBreak/> <Bold><Run Foreground="LimeGreen">Primary Workflow</Run></Bold><LineBreak/> <Run Foreground="White">1️⃣ Load </Run><Bold><Run Foreground="Orange">SetupOverriteDimStyles.lsp</Run></Bold><Run Foreground="White"> in AutoCAD or Civil 3D.</Run><LineBreak/> <Run Foreground="White">2️⃣ Run the command listed above from the AutoCAD command line.</Run><LineBreak/> <Run Foreground="White">3️⃣ Follow the prompts or DCL dialog options shown by the routine.</Run><LineBreak/> <Run Foreground="White">4️⃣ Review the result in the drawing and use AutoCAD Undo if you need to revert the operation.</Run><LineBreak/> <LineBreak/> <Bold><Run Foreground="DodgerBlue">Core Functionalities</Run></Bold><LineBreak/> <Run Foreground="White">✅ Select an object and extract its relevant CAD standards properties.</Run><LineBreak/> <Run Foreground="White">✅ Compare current workspace settings against selected-object settings in a clear DCL matrix.</Run><LineBreak/> <Run Foreground="White">✅ Show quantity counts for current and selected Layer, Text Style, Dimension Style, and MLeader Style usage.</Run><LineBreak/> <Run Foreground="White">✅ Toggle whether to set the selected object layer current.</Run><LineBreak/> <Run Foreground="White">✅ Toggle whether to set the selected text style and text size current.</Run><LineBreak/> <Run Foreground="White">✅ Toggle whether to restore the selected dimension style and/or set the selected MLeader style current.</Run><LineBreak/> <Run Foreground="White">✅ Preserve toggle choices in session variables for repeated use.</Run><LineBreak/> <Run Foreground="White">✅ Wrap updates in an AutoCAD UNDO begin/end group.</Run><LineBreak/> <LineBreak/> <Bold><Run Foreground="DodgerBlue">Important Helper Functions and AutoCAD API Calls</Run></Bold><LineBreak/> <Run Foreground="White">🧩 bugfix-count-mleaders scans MULTILEADER entities and counts objects using a specified MLeader style name through ActiveX.</Run><LineBreak/> <Run Foreground="White">🧩 entget reads the selected object DXF data to determine entity type, layer, text style, dimension style, MLeader style, and text height when available.</Run><LineBreak/> <Run Foreground="White">🧩 ssget "X" database scans count matching layers, text styles, dimension styles, and MLeader styles across the drawing.</Run><LineBreak/> <Run Foreground="White">🧩 A temporary DCL file is written at runtime to build the 4-column Property Matching Workspace Manager dialog.</Run><LineBreak/> <Run Foreground="White">🧩 getcfg and setcfg are used to persist the dialog coordinate configuration under AppData/SetupOverriteDimStyles_Command.</Run><LineBreak/> <Run Foreground="White">🧩 The custom *error* handler unloads the dialog, deletes the temporary DCL file, restores CMDECHO, and restores the previous error handler.</Run><LineBreak/> <LineBreak/> <Bold><Run Foreground="DodgerBlue">Result</Run></Bold><LineBreak/> <Run Foreground="White">📌 The active drawing workspace can be updated to match the selected object's layer, text style, text size, dimension style, and MLeader style depending on enabled toggles.</Run><LineBreak/> <Run Foreground="White">📊 The user sees before/after-relevant counts before accepting the update.</Run><LineBreak/> <Run Foreground="White">🧹 Temporary DCL files are removed after the dialog closes.</Run><LineBreak/> <LineBreak/> <Bold><Run Foreground="DarkRed">Important Notes</Run></Bold><LineBreak/> <Run Foreground="White">⚠️ The uploaded routine name uses the spelling SetupOverriteDimStyles; the command keeps that exact name for compatibility.</Run><LineBreak/> <Run Foreground="White">⚠️ This command changes current drawing variables and active styles rather than modifying all existing objects directly.</Run><LineBreak/> <Run Foreground="White">⚠️ For LEADER, TEXT, and MTEXT objects, style extraction depends on available DXF references in the selected entity data.</Run><LineBreak/> <LineBreak/> <Bold><Run Foreground="Yellow">Tags</Run></Bold><LineBreak/> <Run Foreground="Yellow">🏷️ AutoCAD, 🏷️ AutoLISP, 🏷️ Civil 3D, 🏷️ Dimension Style, 🏷️ MLeader Style, 🏷️ Text Style, 🏷️ Layer Management, 🏷️ DCL Dialog, 🏷️ CAD Standards, 🏷️ Annotation Standards</Run><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>
