Results 1 to 6 of 6

Thread: Modified Quick Leader command, how to get back original options

  1. #1
    100 Club
    Join Date
    2005-12
    Location
    Columbus, OH
    Posts
    158
    Login to Give a bone
    0

    Question Modified Quick Leader command, how to get back original options

    I modified the qleader command a little to set a width for the mtext based on dimscale and the code I wrote works great, but I don't have the option now, if I'd like to change any of the settings. So my question is how would I get that option back into my command.

    This is was I put together:
    Code:
    (defun C:QL ()
    	(setq PT1 (getpoint "\nSelect First point: "))
    	(setq PT2 (getpoint pt1 "\nSelect Second point: "))
    	(setq MTW (* 1.0 (getvar "dimscale")))
    	(COMMAND "_QLEADER" PT1 PT2 "" MTW "")
      )
    [ Moderator Action = ON ] What are [ CODE ] tags... [ Moderator Action = OFF ]
    Last edited by Opie; 2006-10-09 at 06:07 PM. Reason: [CODE] tags added, see Moderator Action

  2. #2
    I could stop if I wanted to
    Join Date
    2003-11
    Posts
    277
    Login to Give a bone
    0

    Default Re: Modified Quick Leader command, how to get back original options

    Hi mhannan.100562,
    Do you mean like this,I'm not sure as you want
    Code:
    (defun c:ql (/ pt1 pt2 mtw)
      (while
        (setq pt1 (getpoint "\nSelect first point: "))
        (setq pt2 (getpoint pt1 "\nSselect second point: "))
        (setq mtw (* 1.0 (getvar "dimscale")))
        (command "_qleader" pt1 pt2 "" mtw "")
        )
      (princ)
      )
    Quote Originally Posted by mhannan.100562
    I modified the qleader command a little to set a width for the mtext based on dimscale and the code I wrote works great, but I don't have the option now, if I'd like to change any of the settings. So my question is how would I get that option back into my command.

    This is was I put together:
    Code:
    (defun C:QL ()
    	(setq PT1 (getpoint "\nSelect First point: "))
    	(setq PT2 (getpoint pt1 "\nSelect Second point: "))
    	(setq MTW (* 1.0 (getvar "dimscale")))
    	(COMMAND "_QLEADER" PT1 PT2 "" MTW "")
      )
    [ Moderator Action = ON ] What are [ CODE ] tags... [ Moderator Action = OFF ]

  3. #3
    Member
    Join Date
    2002-12
    Posts
    10
    Login to Give a bone
    0

    Default Re: Modified Quick Leader command, how to get back original options

    If these that you want ?
    Code:
    (defun C:QL ()
      (if (setq PT1 (getpoint "\nSelect First point:, [Enter for option] "))
        (progn
          (setq PT2 (getpoint pt1 "\nSelect Second point: "))
          (setq MTW (* 1.0 (getvar "dimscale")))
          (COMMAND "_QLEADER" PT1 PT2 "" MTW "")
        )
        (command "_qleader")
      )
      (princ)
    )

  4. #4
    100 Club
    Join Date
    2005-12
    Location
    Columbus, OH
    Posts
    158
    Login to Give a bone
    0

    Smile Re: Modified Quick Leader command, how to get back original options

    This is more along the lines of what I'm looking for, the only thing you have to hit enter twice now to get to the settings menu, and it kicks you out of the command.
    What I really would like is a system variable for the width of Mtext, but I can't seem to find one, but if I could hit a enter and get to the settings menu and then stay in the command that would be nice.

    Quote Originally Posted by mengseng
    If these that you want ?
    Code:
    (defun C:QL ()
      (if (setq PT1 (getpoint "nSelect First point:, [Enter for option] "))
        (progn
          (setq PT2 (getpoint pt1 "nSelect Second point: "))
          (setq MTW (* 1.0 (getvar "dimscale")))
          (COMMAND "_QLEADER" PT1 PT2 "" MTW "")
        )
        (command "_qleader")
      )
      (princ)
    )

  5. #5
    Member TobyKanoby's Avatar
    Join Date
    2006-06
    Posts
    25
    Login to Give a bone
    0

    Default Re: Modified Quick Leader command, how to get back original options

    Not sure if 0 for mtext width works better. Here is my try at it.
    TK
    Code:
    (defun c:QL ()
      (initget 128);allow arbitrary entry
      (setq pt1 (getpoint "\nSpecify first leader point, or [Settings] <Settings>: "))
      (if (= (type pt1) 'LIST)
       (progn
        (setq pt2 (getpoint pt1 "\nSpecify next point: "))
        ;(setq mtw (getvar "dimscale"))
        (setq mtw 0);this also works
        (command "_qleader" pt1 pt2 "" mtw "")
       )
       (progn
        (if (member pt1 (list nil "S" "s"))
         (progn
          (command "_qleader" "s" ^c)
          (c:QL)
         )
         (progn
          (princ "\nInvalid Input.")
          (c:QL)
         )
        )
       )
     )
     (princ)
    )

  6. #6
    100 Club
    Join Date
    2005-12
    Location
    Columbus, OH
    Posts
    158
    Login to Give a bone
    0

    Thumbs up Re: Modified Quick Leader command, how to get back original options

    This is what I was looking for THANK YOU. I did change the mtext width setting back to what I was using. We like to have notes with word wrapping so we can modify the how many lines there are in the note without putting a hard return in the note.

    Thanks again for everyone help on this, my users also thank you.

    Quote Originally Posted by TobyKanoby
    Not sure if 0 for mtext width works better. Here is my try at it.
    TK
    Code:
    (defun c:QL ()
      (initget 128);allow arbitrary entry
      (setq pt1 (getpoint "nSpecify first leader point, or [Settings] <Settings>: "))
      (if (= (type pt1) 'LIST)
       (progn
        (setq pt2 (getpoint pt1 "nSpecify next point: "))
        ;(setq mtw (getvar "dimscale"))
        (setq mtw 0);this also works
        (command "_qleader" pt1 pt2 "" mtw "")
       )
       (progn
        (if (member pt1 (list nil "S" "s"))
         (progn
          (command "_qleader" "s" ^c)
          (c:QL)
         )
         (progn
          (princ "nInvalid Input.")
          (c:QL)
         )
        )
       )
     )
     (princ)
    )

Similar Threads

  1. Design Options - How do I revert to original model?
    By rtaube in forum Revit Architecture - General
    Replies: 1
    Last Post: 2012-02-09, 11:50 PM
  2. User profile reverts back to original
    By jenniferchavez in forum AutoCAD Civil 3D - General
    Replies: 7
    Last Post: 2011-05-31, 09:10 PM
  3. Copied Leader lines point back to original geometry
    By trud1966 in forum AutoCAD General
    Replies: 9
    Last Post: 2007-05-29, 01:03 PM
  4. Replies: 8
    Last Post: 2006-10-28, 09:47 PM
  5. Visretain to hold only layers modified from original xref
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2006-02-28, 08:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •