+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Forum Deity Dadgad's Avatar
    Using
    AutoCAD 2012
    Join Date
    Nov 2011
    Location
    At the confluence of worthlessness & invaluability
    Posts
    3,134

    Default Making DIMCONTINUE command honor current DIMSTYLE text placement formatting

    Registered forum members do not see this ad.

    I really enjoy using the DIMCONTINUE command, as it is really fast.
    The problem I have with it, is that it overrides the current dimstyle
    defined, TEXT PLACEMENT setting, with 'ABOVE DIM LINE WITH LEADER'.
    I would prefer that it honor the DIMSTYLE saved text placement.

    As it works now, every time I finish using this for a string of continued dimensions I need to remember to select them all and reapply the current dimstyle from the right click shortcut menu.
    If I don't, and there are any dimensions too short to accommodate the text and arrows, the leader is added, which I don't want.
    Attached Images
    Volume and repetition do not validate opinions forged in the absence of thought.

  2. #2
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,737

    Default

    Below is a very simple automation of the DimContinue and DimStyle commands:

    Code:
    (defun c:dimc ( / en )
        (setq en (entlast))
        (command "_.dimcontinue")
        (while (= 1 (logand 1 (getvar 'cmdactive)))
            (command "\\")
        )
        (if (not (eq en (entlast)))
            (progn
                (command "_.-dimstyle" "_A")
                (while (setq en (entnext en))
                    (command en)
                )
                (command "")
            )
        )
        (princ)
    )
    Hope this helps!
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  3. #3
    Forum Deity Dadgad's Avatar
    Using
    AutoCAD 2012
    Join Date
    Nov 2011
    Location
    At the confluence of worthlessness & invaluability
    Posts
    3,134

    Default

    Hi Lee, thanks very much for doing this,
    but it seems I am still having the same issue.
    Which seems to be that the DIMTMOVE value needs to remain 0, or be reset to 0 for any of the newly completed
    dimensions, and the default behavior seems to switch it to 1, whenever the available space for the text
    on the dimension line crosses the minimum threshold, instead of moving the text horizontally outside the arrow.

    If I check the properties of a very short newly created continued dimension (displaying with the unwanted leader), in Properties it still says
    it is the current dimstyle, BUT in order to restore that DIMTMOVE variable to 0, I have to click
    dimension style in my right click shortcut menu and select the current dimstyle there, and that will reset it to
    the TEXT PLACEMENT being beside the dimension line.
    Volume and repetition do not validate opinions forged in the absence of thought.

  4. #4
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,737

    Default

    Quote Originally Posted by Dadgad View Post
    Hi Lee, thanks very much for doing this,
    but it seems I am still having the same issue.
    You're welcome, though that's odd since the code seems to work for me:

    DimCont.gif
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  5. #5
    Forum Deity Dadgad's Avatar
    Using
    AutoCAD 2012
    Join Date
    Nov 2011
    Location
    At the confluence of worthlessness & invaluability
    Posts
    3,134

    Default

    Yes Lee, that is a very compelling argument, I must agree.
    Let me give that another try.

    I see said the blindman!
    I was using the ESC button to exit the command, instead of ENTER.
    Wherever you go, there you are!
    Working like a charm now, just needed to keep my eyes on the road, thanks very much Lee!

    That's smokin'!
    Last edited by Dadgad; 4th Sep 2012 at 03:38 pm.
    Volume and repetition do not validate opinions forged in the absence of thought.

  6. #6
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,737

    Default

    No worries Dadgad

    Try this:
    Code:
    (defun c:dimc ( / *error* en )
        (defun *error* ( m )
            (if (not (eq en (entlast)))
                (progn
                    (command "_.-dimstyle" "_A")
                    (while (setq en (entnext en))
                        (command en)
                    )
                    (command "")
                )
            )
            (princ)
        )
        (setq en (entlast))
        (command "_.dimcontinue")
        (while (= 1 (logand 1 (getvar 'cmdactive)))
            (command "\\")
        )
        (*error* nil)
        (princ)
    )
    Now you should be able to exit with either 'Enter' or 'Esc'.
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  7. #7
    Forum Deity Dadgad's Avatar
    Using
    AutoCAD 2012
    Join Date
    Nov 2011
    Location
    At the confluence of worthlessness & invaluability
    Posts
    3,134

    Default

    Too cool for school Lee!
    Big old smile on my face, don't even need to learn how to use it.
    Now that is what great design is all about, thanks again!
    Volume and repetition do not validate opinions forged in the absence of thought.

  8. #8
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,737

    Default

    Thanks Dadgad, you're very welcome.
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  9. #9
    Forum Deity Dadgad's Avatar
    Using
    AutoCAD 2012
    Join Date
    Nov 2011
    Location
    At the confluence of worthlessness & invaluability
    Posts
    3,134

    Default

    Registered forum members do not see this ad.

    I'm now eager to apply this enhanced version of DIMCONTINUE to
    the hover over GRIP MENU for dimensions, so that if I choose to dimcontinue from that
    drop down menu it will use this, instead of the default version.
    If I click on DIMCONTINUE in that dropdown, the commandline shows
    ** CONTINUE DIMENSION **.
    I tried creating a new alias for that in the CUI, but it is not recognized?
    Volume and repetition do not validate opinions forged in the absence of thought.

Similar Threads

  1. Dimcontinue.lsp
    By Lt Dan's legs in forum AutoLISP, Visual LISP & DCL
    Replies: 17
    Last Post: 22nd Jun 2012, 08:22 am
  2. adding default value and making layer according to current
    By Michaels in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 19th Feb 2012, 12:29 pm
  3. Make dimstyle current
    By Atwist in forum AutoLISP, Visual LISP & DCL
    Replies: 9
    Last Post: 3rd Jun 2010, 12:37 pm
  4. Replies: 7
    Last Post: 20th Nov 2008, 01:33 pm

Tags for this Thread

Bookmarks

Posting Permissions

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