Author Topic: Getpoint of 'pause'  (Read 4739 times)

0 Members and 1 Guest are viewing this topic.

Oak3s

  • Guest
Getpoint of 'pause'
« on: April 20, 2010, 03:25:11 PM »
The routine works well. I believe the routine is one originally from CAB's library. I dont have the information to give proper credit.

What we would like to do is pause the leader command so we can see the leader. Currently we see the 'line' the leader will be drawn on but we dont see the leader arrow. Its a little thing but would be cool if it showed up.

The hangup is we need to save the points in order to give the text a point to be based on.
Is there a way to "getpoint" of a pause (verbiage is probably totally wrong)

Code: [Select]
(setq PT1 (getpoint "\nPick Leader Start Point: "))
(setq PT2 (getpoint PT1 "\nPick Leader Second Point: "))
(if (> (car PT1) (car PT2))
(setq PT3 (polar PT2 0 (* DIMSC -0.125)))
(setq PT3 (polar PT2 0 (* DIMSC 0.125)))
)
(command ".leader" PT1 PT2 PT3 "" "" "None")
(if (> (car PT1) (car PT2))
(setq PT4 (polar PT3 0 (* DIMSC -0.0625)))
(setq PT4 (polar PT3 0 (* DIMSC 0.0625)))
)

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Getpoint of 'pause'
« Reply #1 on: April 20, 2010, 03:45:43 PM »
Maybe something like this:

Code: [Select]
(setq dimsc (getvar 'dimscale))
(setq pt1 (getpoint "\nPick Leader Start Point: "))
(vl-cmdf ".leader" pt1 pause "" "" "None")
(setq pt2 (getvar 'lastpoint))
(entdel (entlast))
(vl-cmdf ".leader"
pt1
pt2
(if (> (car pt1) (car pt2))
   (setq pt3 (polar pt2 0 (* dimsc -0.125)))
   (setq pt3 (polar pt2 0 (* dimsc 0.125)))
)
""
""
"None"
)
(if (> (car pt1) (car pt2))
  (setq pt4 (polar pt3 0 (* dimsc -0.0625)))
  (setq pt4 (polar pt3 0 (* dimsc 0.0625)))
)

**You should look into mleaders and mleader styles.
« Last Edit: April 20, 2010, 04:15:32 PM by ronjonp »

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Oak3s

  • Guest
Re: Getpoint of 'pause'
« Reply #2 on: April 20, 2010, 04:42:22 PM »
Ah, I was thinking about something similar. Create a leader and then delete it. That solved that. Thanks again. Works very nice.
As for mleaders...great idea and we have had the discussion in the company before. Problem seems to be our detail library is packed with leaders and text...not mleaders.  :cry: maybe someday.
Thanks again.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Getpoint of 'pause'
« Reply #3 on: April 20, 2010, 04:53:27 PM »
...  Problem seems to be our detail library is packed with leaders and text...not mleaders.  :cry: maybe someday.
Thanks again.

Perhaps this would be of help to clean them up:

http://www.theswamp.org/index.php?topic=30934.msg364891#msg364891

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Getpoint of 'pause'
« Reply #4 on: April 20, 2010, 05:05:43 PM »
Slick Ron. :)

You should store (entlast) before issueing the first leader command with Pause for comparison. That way, if the user doesn't specify a second point, the routine won't continue and erase some other object.

Maybe something like this:

Code: [Select]
(setq dimsc (getvar 'dimscale))
(setq pt1 (getpoint "\nPick Leader Start Point: "))
(vl-cmdf ".leader" pt1 pause "" "" "None")
(setq pt2 (getvar 'lastpoint))
(entdel (entlast))
(vl-cmdf ".leader"
pt1
pt2
(if (> (car pt1) (car pt2))
   (setq pt3 (polar pt2 0 (* dimsc -0.125)))
   (setq pt3 (polar pt2 0 (* dimsc 0.125)))
)
""
""
"None"
)
(if (> (car pt1) (car pt2))
  (setq pt4 (polar pt3 0 (* dimsc -0.0625)))
  (setq pt4 (polar pt3 0 (* dimsc 0.0625)))
)

**You should look into mleaders and mleader styles.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Oak3s

  • Guest
Re: Getpoint of 'pause'
« Reply #5 on: April 21, 2010, 11:42:16 AM »
How would you go about doing that?

Code: [Select]
(setq ent1 (entlast)) But I dont know what to do with that. :|

This was an idea i tried...not working.
Code: [Select]
(setq PT1 (getpoint "\nSpecify first leader point: "))
(princ "\nSpecify next point: ")
(vl-cmdf ".leader" pt1 pause "" "" "None")
(setq pt2 (getvar 'lastpoint))
(if (> pt2 nil)(entdel (entlast))) ;;; I am missing something because this isnt working as I thought

Lee Mac

  • Seagull
  • Posts: 12916
  • London, England
Re: Getpoint of 'pause'
« Reply #6 on: April 21, 2010, 12:03:36 PM »
Perhaps:

Code: [Select]
(setq LastEntity (entlast))
(setq dimsc (getvar 'dimscale))
(setq pt1 (getpoint "\nPick Leader Start Point: "))
(vl-cmdf ".leader" pt1 pause "" "" "None")
(setq pt2 (getvar 'lastpoint))
(if (not (equal LastEntity (entlast)))
  (progn
    (entdel (entlast))
    (vl-cmdf ".leader"
pt1
pt2
(if (> (car pt1) (car pt2))
   (setq pt3 (polar pt2 0 (* dimsc -0.125)))
   (setq pt3 (polar pt2 0 (* dimsc 0.125)))
)
""
""
"None"
      )
    (if (> (car pt1) (car pt2))
      (setq pt4 (polar pt3 0 (* dimsc -0.0625)))
      (setq pt4 (polar pt3 0 (* dimsc 0.0625)))
    )
  )
)

Be sure to use the correct function (equal, eq or =)  :-)

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Getpoint of 'pause'
« Reply #7 on: April 21, 2010, 12:05:10 PM »
Precisely what I was getting at. :kewl:
Perhaps:

Code: [Select]
(setq LastEntity (entlast))
(setq dimsc (getvar 'dimscale))
(setq pt1 (getpoint "\nPick Leader Start Point: "))
(vl-cmdf ".leader" pt1 pause "" "" "None")
(setq pt2 (getvar 'lastpoint))
(if (not (equal LastEntity (entlast)))
  (progn
    (entdel (entlast))
    (vl-cmdf ".leader"
pt1
pt2
(if (> (car pt1) (car pt2))
   (setq pt3 (polar pt2 0 (* dimsc -0.125)))
   (setq pt3 (polar pt2 0 (* dimsc 0.125)))
)
""
""
"None"
      )
    (if (> (car pt1) (car pt2))
      (setq pt4 (polar pt3 0 (* dimsc -0.0625)))
      (setq pt4 (polar pt3 0 (* dimsc 0.0625)))
    )
  )
)

Be sure to use the correct function (equal, eq or =)  :-)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Oak3s

  • Guest
Re: Getpoint of 'pause'
« Reply #8 on: April 21, 2010, 12:20:34 PM »
Awesome! Thank you both.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Getpoint of 'pause'
« Reply #9 on: April 21, 2010, 01:10:59 PM »
I still vote for Mleaders  :-P

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Oak3s

  • Guest
Re: Getpoint of 'pause'
« Reply #10 on: April 21, 2010, 01:13:43 PM »
Oh yeah, I forgot to mention that I followed the link above and the routine is great. I am going to look more into it when time is available. Thanks for the recommendation. If only mtext wasnt a pain to edit...specifically ENTER/RETURN to close. I read something about 2011 having something new to do with this....hmmmm...

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Getpoint of 'pause'
« Reply #11 on: April 21, 2010, 01:20:19 PM »
I still vote for Mleaders  :-P
Ditto :love:
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Getpoint of 'pause'
« Reply #12 on: April 21, 2010, 01:36:58 PM »
Oh yeah, I forgot to mention that I followed the link above and the routine is great. I am going to look more into it when time is available. Thanks for the recommendation. If only mtext wasnt a pain to edit...specifically ENTER/RETURN to close. I read something about 2011 having something new to do with this....hmmmm...
Quote
Hit ctrl+enter to exit the edit mtext command.
Also, picking outside the editor window is as good as enter or ctrl+enter and a bit faster to boot.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Lee Mac

  • Seagull
  • Posts: 12916
  • London, England
Re: Getpoint of 'pause'
« Reply #13 on: April 21, 2010, 01:45:43 PM »
Quote
Hit ctrl+enter to exit the edit mtext command.
Also, picking outside the editor window is as good as enter or ctrl+enter and a bit faster to boot.

Didn't know that! Thanks Alan  :-)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Getpoint of 'pause'
« Reply #14 on: April 21, 2010, 03:06:47 PM »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Getpoint of 'pause'
« Reply #15 on: April 21, 2010, 09:50:56 PM »
Quote
Hit ctrl+enter to exit the edit mtext command.
Also, picking outside the editor window is as good as enter or ctrl+enter and a bit faster to boot.

Didn't know that! Thanks Alan  :-)
Boo clicking OK
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Bob Wahr

  • Guest
Re: Getpoint of 'pause'
« Reply #16 on: April 22, 2010, 04:19:56 PM »
I still vote for Mleaders  :-P
He's dealing with a mentality that won't allow multiple layout tabs in one of their offices because a couple of the drafters (the "CAD Manager" being (the main) one of them) can't remember to look to see if there are other tabs when they plot and don't notice that they are missing sheets before a) giving drawings to the engineer or b) sending jobs out.

Oak3s

  • Guest
Re: Getpoint of 'pause'
« Reply #17 on: April 22, 2010, 04:54:59 PM »
 :lol: To true...

Bob Wahr

  • Guest
Re: Getpoint of 'pause'
« Reply #18 on: April 22, 2010, 05:34:47 PM »
I don't miss that.  Not for a second.

Back on to the side discussion though, I decided to go with mtext and mleaders in this office and am generally happy with the decision although I run into a few quirks at times that bug a bit.  The one negative that I have with MTEXT though, especially on single line text, is the ability to edit the text in the properties bar.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Getpoint of 'pause'
« Reply #19 on: April 22, 2010, 07:17:01 PM »
I don't miss that.  Not for a second.

Back on to the side discussion though, I decided to go with mtext and mleaders in this office and am generally happy with the decision although I run into a few quirks at times that bug a bit.  The one negative that I have with MTEXT though, especially on single line text, is the ability to edit the text in the properties bar.
I've never understood why they made that available (or really just made it unavailable). You can access all the formatting codes.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox