Short description
Sort / Purpose: Interactively pick nested TEXT, MTEXT, DIMENSION, LEADER, and BLOCK entities, extract their text and send it to the clipboard, then clean up temporary copies.
• Scope: Works on nested entities inside blocks or references using CTC3 as a “pick-through” text exporter.
• Goal: Quickly grab text content from visually picked nested items, copy that text to the Windows clipboard, and automatically delete the intermediate copied entities from the drawing.
Command:
Command name: CTC3
How to run: Type CTC3 in the command line and begin picking nested entities.
• CTCCOPY: Runs automatically after picking finishes, collecting text and sending it to clipboard.
Description:
• Nested Picking: Lets the user select entities *inside* blocks or complex structures using NENTSELP.
• Entity Duplication: Each picked item is duplicated using ENTMAKEX so its text can be extracted independently.
• Transformation: Applies the exact nested transformation matrix so the copy matches the original nested orientation.
• Text Extraction: Reads text differently depending on entity type: TEXT, MTEXT, DIMENSION, LEADER, or BLOCK attributes.
• Clipboard Export: After finishing selections, CTCCOPY extracts text from all temporary copies and sends it to the Windows clipboard.
• Cleanup: Deletes all generated temporary entities after copying text so the drawing stays unchanged.
Helper function: (if any)
Internal helper functions:
• c:GetTextFromEntity: Extracts readable text depending on entity type (TEXT, MTEXT, DIMENSION, LEADER, BLOCK_REFERENCE).
• CTCCOPY: Collects all stored copied entities, extracts text, pushes it to clipboard, and deletes temp entities.
Key AutoLISP / COM functions:
• nentselp: Picks nested references inside blocks.
• entmakex / entdel: Creates and deletes temporary entities.
• vlax-tmatrix / transformBy: Applies nested transformation matrices.
• vlax-ename->vla-object: Required for dimension & leader text access.
• htmlfile COM object: Writes the cleaned result directly to Windows clipboard.
Functionalities:
• Nested Entity Picking: Supports selecting items inside block references with full transformation accuracy.
• Supported Types: TEXT, MTEXT, DIMENSION (with override or measurement), LEADER (via Annotation), and BLOCK attribute text.
• Temporary Copy System: Creates duplicates on the current layer for consistent extraction.
• Text Aggregation: Multiple selected entities produce a combined clipboard output, each separated by line breaks.
• Clipboard Automation: Automatically exports collected text into Windows clipboard without extra interaction.
• Cleanup Guarantee: All temporary entities are removed after copying, leaving the drawing unmodified.
Result:
Result: All text gathered from your picked nested entities is extracted, combined, and copied directly into the Windows clipboard.
• Accurate extraction: TEXT + MTEXT + DIMENSION override/measurement + LEADER annotation + BLOCK attributes.
• Fully automatic cleanup: All temporary entity copies used to extract text are deleted automatically.
• Clipboard-ready output: Final text is immediately paste-ready for Excel, Word, Notepad, emails, or documentation.
• Unmodified drawing: No permanent entities remain from the extraction process.
Copy code:
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="Copy_to_Clipboard_Xref"> <src:RibbonToolTip.ExpandedContent> <StackPanel> <TextBlock Background="AntiqueWhite" TextAlignment="Left"> <Bold>Function Syntax: CTC3</Bold> <LineBreak/> <Hyperlink>web</Hyperlink> <LineBreak/> <Bold>Description</Bold><LineBreak/> <LineBreak/> This AutoLISP program <Span Foreground="DarkRed">CTC3</Span> allows the user to select nested text, mtext, dimensions, leaders, or blocks from an XRef or block reference, copy them to the current drawing’s layer, and automatically copy their text content to the system clipboard.<LineBreak/> <Bold>Functionalities:</Bold><LineBreak/> <LineBreak/> • Command syntax: <Span Foreground="DarkRed">CTC3</Span>.<LineBreak/> • Prompts the user to pick nested entities inside an XRef or block.<LineBreak/> • Accepts entity types: TEXT, MTEXT, DIMENSION, LEADER, BLOCK_REFERENCE.<LineBreak/> • Creates copies of selected entities in the current drawing.<LineBreak/> • Preserves transformation matrix from the source reference.<LineBreak/> • Places the copied entities on the current layer.<LineBreak/> • Stores copied entities in a global list for further processing.<LineBreak/> • Extracts text from selected entities (including dimension measurement text if not overridden).<LineBreak/> • Uses the system clipboard to store extracted text for easy pasting elsewhere.<LineBreak/> • Deletes the copied entities after clipboard storage if needed.<LineBreak/> <Bold>Key Features:</Bold><LineBreak/> • Works with nested selections inside XRefs and non-XRef blocks.<LineBreak/> • Supports transformation using <Span Foreground="DarkRed">vla-transformby</Span>.<LineBreak/> • Can process multiple selected entities in a single run.<LineBreak/> • Automatically counts and reports the number of copied entities.<LineBreak/> <Bold>Function Syntax</Bold><LineBreak/> • <Span Foreground="DarkRed">CTC3</Span><LineBreak/> <Bold>Typical Workflow</Bold><LineBreak/> • Run <Span Foreground="DarkRed">CTC3</Span>, select nested text, mtext, dimensions, leaders, or blocks from an XRef or block, and the program will copy them into the current drawing, extract their text, place it on the clipboard, and optionally remove the temporary copies.<LineBreak/> </TextBlock> </StackPanel> </src:RibbonToolTip.ExpandedContent> </src:RibbonToolTip> </ResourceDictionary>
Additional info:
Based on / Source code:
Open Website
Based on / Source code:
Open Website
Based on / Source code:
Open Website
Share this page:
Subscribe
Login
0 Comments
Oldest
Tags: 🏷️ Autocad Lisps, 🏷️ Text_menu
Tags: 🏷️ Autocad Lisps, 🏷️ Text_menu
