Author Topic: Replacement for lost DIM LEA command 2015- had  (Read 1481 times)

0 Members and 1 Guest are viewing this topic.

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Replacement for lost DIM LEA command 2015- had
« on: November 20, 2018, 06:07:54 PM »
I got a request for this so try this. Command is DIMLEA.
Anyone watching might also harvest its functions for entmaking of solid, lines, and mtext.
« Last Edit: November 20, 2018, 06:11:41 PM by jmaeding »
James Maeding

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Replacement for lost DIM LEA command 2015- had
« Reply #1 on: November 21, 2018, 11:44:40 AM »
A viable alternative to this approach is to use the mLeader command and then explode it after its creation and text entry.

Something like this should do the trick:
Code: [Select]
(defun c:DimLea (/ Pt1 Pt2)
    (command "._mleader" "_O" "_A" "_Y" "0" "_X" (SETQ Pt1 (getpoint "\nSpecify leader arrowhead location:")) (setq Pt2 (getpoint Pt1 "\nSpecify landing location:")) (getpoint Pt2 "\nSpecify landing length:") (getstring T "\nEnter dimension text:"))
    (command "._explode" (entlast) "")
    (princ)
)

You could and should add a lot more error handling, but this gives a quick proof of concept on this. For us, we have found we like mleaders much better, but this accomplishes your goal.

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: Replacement for lost DIM LEA command 2015- had
« Reply #2 on: November 21, 2018, 12:32:01 PM »
I thought about such an approach, for qleader command also.
You have to be really careful about adding "explode" (entlast) to functions though.
It the user does something that causes nothing to be drawn, some other entity gets exploded.
Also, you need to account for leaders with more than 1 segment. You can do a loop for that.
Mleaders are indeed nice, just a lot harder to manipulate after drawn, than the old qleader results.
I must say though, that at a minimum the exploded dims from DIM LEA would drive me nuts.
That arrowhead not staying in line with the leader when modified is more than my brain could handle.
We absolutely do not allow exploded leaders at my place.
James Maeding