Short description
- AM — convert selected TEXT/MTEXT into a single MLeader with combined text and preserved max width
- Sorts text by insertion point (Y order) and concatenates into one string
- Creates an MLeader by picking arrowhead and landing points, then applies TextString and TextWidth
- Deletes the original text entities after building the combined content
Command:
- AM
Description:
- Selects all objects matching *TEXT (TEXT and MTEXT).
- Builds a combined text string by extracting each object’s TextString, appending a space, and sorting the items by insertion point so the final text follows a top-to-bottom Y order.
- Computes a target MLeader text width as the maximum bounding-box width among the selected objects.
- Prompts for arrowhead and landing points, runs the MLEADER command to create the leader, then sets the new leader’s TextString and TextWidth to the calculated values.
- Deletes the original selected text objects once their content has been captured.
Helper function: (if any)
- • rjp-getbbwdth — gets an object’s bounding box and returns a width estimate by measuring the horizontal span between the lower-left corner and the upper-right X at the same Y.
- • vl-sort + insertion point pairing — builds (insertionpoint . text) pairs and sorts them by insertion point Y to determine concatenation order.
Functionalities:
- • Select TEXT/MTEXT — uses ssget with filter (0 . "*TEXT") to capture text-like objects.
- • Convert selection set to VLA objects — converts entity names to VLA objects and removes nested list entries from ssnamex results.
- • Create ordered combined text — concatenates each TextString with a trailing space, sorted by Y so the final string follows the visual stack order.
- • Compute width — evaluates rjp-getbbwdth over all selected objects and uses the maximum as the new MLeader TextWidth.
- • Trim trailing character — removes the last character from the built string (effectively trimming the trailing space).
- • Delete originals — deletes the selected text objects after capture via vla-delete.
- • Create MLeader — prompts for arrowhead point then landing point, runs ._MLEADER, and grabs the newly created entity via entlast.
- • Apply text + width — sets the new leader’s TextString to the combined text and TextWidth to the computed maximum width.
Result:
- A single MultiLeader is created using user-picked arrowhead and landing locations.
- The new MLeader text is the concatenation of the selected TEXT/MTEXT strings in top-to-bottom order, with trailing whitespace removed.
- The new MLeader text width is set to the maximum bounding-box width found among the original text objects, and the original text objects are deleted.
Images, animations etc.
Share this page:
Subscribe
Login
0 Comments
Oldest
