Author Topic: "Rotating" MLeader block content to horizontal  (Read 7975 times)

0 Members and 1 Guest are viewing this topic.

cadpoobah

  • Newt
  • Posts: 48
"Rotating" MLeader block content to horizontal
« on: January 03, 2018, 04:21:03 PM »
We have some drawings that have been rotated, along with all their MLeaders (some containing text, some containing blocks). These all need re-oriented to be horizontal again.

Fixing those with text is not a huge deal. It can be done manually via the Properties palette (there's a "Rotation" option). I was also able to write a function that will select all the MLeaders and change the rotation to 0 via the vla-put-TextRotation function.

The MLeaders with blocks is another issue, though. There is no similar vla- function that I've found. There is a DXF group code (46) that returns the block's rotation. Changing it "appears" to work, but if the grip-edit the leader afterward, it still acts as if the MLeader is rotated (the new landing goes haywire).

Ideally, I'd like to create a TOrient-style program that would work for MLeaders, rotating them to be horizontal. For that matter, I'd even be satisfied if the function deleted the existing MLeader and simply recreated it using the same points.

Any thoughts or suggestions would be appreciated!
Chris Lindner
Onebutton CAD Solutions
----------------------------------------------------
www.onebuttoncad.com #dayjob
www.unpavedart.com    #sidehustle

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: "Rotating" MLeader block content to horizontal
« Reply #1 on: January 03, 2018, 04:50:02 PM »
How about using the ROTATE command / vla-rotate method to rotate the MLeader about its arrowhead point by the angle of the text rotation?

cadpoobah

  • Newt
  • Posts: 48
Re: "Rotating" MLeader block content to horizontal
« Reply #2 on: January 03, 2018, 05:33:26 PM »
That's a possibility, but the MLeader itself could potentially end up being rotated back over top of other geometry that it didn't overlap previously.

I'd rather the leader's basic geometry stay how it is and only the content (the block) be reoriented, similar to how changing the Rotation property in the palette only changes the text's orientation, leaving the leader geometry alone (except for the landing).
« Last Edit: January 04, 2018, 01:25:30 PM by cadpoobah »
Chris Lindner
Onebutton CAD Solutions
----------------------------------------------------
www.onebuttoncad.com #dayjob
www.unpavedart.com    #sidehustle

ChrisCarlson

  • Guest
Re: "Rotating" MLeader block content to horizontal
« Reply #3 on: January 04, 2018, 12:51:48 PM »
Simple fix would be to simply have a vertical and horizontal version of the block tied to a mleader style. Then simply change the desired mleader style.

cadpoobah

  • Newt
  • Posts: 48
Re: "Rotating" MLeader block content to horizontal
« Reply #4 on: January 04, 2018, 01:24:11 PM »
Simple fix would be to simply have a vertical and horizontal version of the block tied to a mleader style. Then simply change the desired mleader style.

Yes, if things were only rotated in 90 deg increments. *sigh*
Chris Lindner
Onebutton CAD Solutions
----------------------------------------------------
www.onebuttoncad.com #dayjob
www.unpavedart.com    #sidehustle

ChrisCarlson

  • Guest
Re: "Rotating" MLeader block content to horizontal
« Reply #5 on: January 05, 2018, 09:13:00 AM »
If your desire is to have 360° of rotation of full function within the mleader, I don't see that being possible.

cadpoobah

  • Newt
  • Posts: 48
Re: "Rotating" MLeader block content to horizontal
« Reply #6 on: January 05, 2018, 12:17:01 PM »
Not exactly, @Master_Shake. I'm not expecting "grip-edit" style functionality, where you can simply click on the MLeader's block and rotate it to any angle (although, that could be pretty handy!).

Rather, if geometry (including MLeaders) gets rotated, I would like a way to re-orient the MLeader content (whether text or block) to its proper, readable orientation (again, think TOrient). As mentioned, this is possible for MLeaders with text, but for for MLeaders with blocks, the only option is to delete and recreate it.
 

I just want functionality that is already possible with MLeaders containing text; via the TextRotation function. I guess expecting consistent behavior across all AutoCAD objects is a little too much to ask.  :tickedoff:

« Last Edit: January 05, 2018, 12:32:52 PM by cadpoobah »
Chris Lindner
Onebutton CAD Solutions
----------------------------------------------------
www.onebuttoncad.com #dayjob
www.unpavedart.com    #sidehustle

ronjonp

  • Needs a day job
  • Posts: 7527
Re: "Rotating" MLeader block content to horizontal
« Reply #7 on: January 05, 2018, 12:22:56 PM »
Why is the drawing getting rotated? It seems that the "correct" way to do this is DVIEW TWIST ?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

cadpoobah

  • Newt
  • Posts: 48
Re: "Rotating" MLeader block content to horizontal
« Reply #8 on: January 05, 2018, 12:31:48 PM »
Why is the drawing getting rotated? It seems that the "correct" way to do this is DVIEW TWIST ?

Agreed. More precisely, the geometry has been rotated, not the drawing.
Chris Lindner
Onebutton CAD Solutions
----------------------------------------------------
www.onebuttoncad.com #dayjob
www.unpavedart.com    #sidehustle

ronjonp

  • Needs a day job
  • Posts: 7527
Re: "Rotating" MLeader block content to horizontal
« Reply #9 on: January 05, 2018, 12:50:10 PM »
Maybe post a drawing with before and after results.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

cadpoobah

  • Newt
  • Posts: 48
Re: "Rotating" MLeader block content to horizontal
« Reply #10 on: January 05, 2018, 02:08:22 PM »
Maybe post a drawing with before and after results.

Posted. Shown (left) is an office layout in it's typical orientation. But it's not uncommon to need that layout oriented completely differently (right), requiring manual MLeader cleanup afterward.

Now, expand that cleanup effort to other areas of the drawing (potentially the entire drawing) and you get an idea of why a TOrient-style program would be extremely helpful.
Chris Lindner
Onebutton CAD Solutions
----------------------------------------------------
www.onebuttoncad.com #dayjob
www.unpavedart.com    #sidehustle

ChrisCarlson

  • Guest

ronjonp

  • Needs a day job
  • Posts: 7527
Re: "Rotating" MLeader block content to horizontal
« Reply #12 on: January 05, 2018, 02:30:22 PM »
If this is always an issue, is there a possibility to change your leaders to have mtext content? Then this would be VERY easy :).

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

cadpoobah

  • Newt
  • Posts: 48
Re: "Rotating" MLeader block content to horizontal
« Reply #13 on: January 05, 2018, 03:00:58 PM »
Some searching yield something that kind of works

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-mleader-rotate-an-existing-mleader/m-p/7665762/highlight/true#M363381

Yea, I'm tracking that thread as well. SonicSSV's solution is getting closer. Will definitely share a link if there are any breakthroughs.
Chris Lindner
Onebutton CAD Solutions
----------------------------------------------------
www.onebuttoncad.com #dayjob
www.unpavedart.com    #sidehustle

cadpoobah

  • Newt
  • Posts: 48
Re: "Rotating" MLeader block content to horizontal
« Reply #14 on: January 05, 2018, 03:02:22 PM »
If this is always an issue, is there a possibility to change your leaders to have mtext content? Then this would be VERY easy :).

Agreed. Client wants their cute little ovals.  :hahanot:
Chris Lindner
Onebutton CAD Solutions
----------------------------------------------------
www.onebuttoncad.com #dayjob
www.unpavedart.com    #sidehustle