Short description
Rotate Text and Mtext in Viewport
Aligns TEXT objects to viewport rotation while resetting MTEXT to horizontal orientation.
Command:
Command: RotateMtextVport
Description:
This command adjusts text orientation based on the current viewport rotation:
- MTEXT objects are reset to 0° rotation (horizontal) with top-left attachment point
- TEXT objects are rotated to match the viewport’s UCS X-axis angle with left alignment
Helper function: (if any)
Helper Functions:
- vl-load-com – Loads Visual LISP COM support
- angle – Calculates viewport rotation angle
- trans – Transforms coordinates from UCS to WCS
- vlax-ename->vla-object – Converts entity name to VLA object
- vlax-put – Sets object properties
Functionalities:
Functionalities:
- Calculates current viewport rotation by measuring UCS X-axis angle in WCS
- Prompts user to select TEXT and/or MTEXT objects
- Iterates through selected objects and applies rotation based on object type
- For MTEXT: sets rotation to 0° and attachment point to top-left
- For TEXT: sets rotation to viewport angle and alignment to left
- Displays message if no objects are selected
Result:
Result:
- All selected MTEXT objects become horizontally oriented (0° rotation)
- All selected TEXT objects rotate to match the viewport orientation
- Text readability is improved in rotated viewports
Images, animations etc.
Log in to download.
Log in
Log in
Additional info:
Based on / Source code:
Open Website
