AutoLISP: Match Dimension Style

Although you can accomplish the same thing by using the MATCHPROP command, there have been problems with its behavior. This routine simply lets you match the dimension style. There is an added feature that lets you match the text style within the dimension to other text objects like MTEXT or DTEXT but you must first select a dimension to match its properties.

Here’s how:

  • DM <enter> to start Dimension Match
  • Select a dimension that has the properties that you want the other dimensions (or text) to have.
  • Select the other dimensions that you want to take on the dimension style of the first dimension selected.

~enjoy

Link to code here: http://web2.airmail.net/terrycad/LISP/DM.lsp

Note: I have linked to the code because the author makes updates as needed and this makes sure that you (the viewer) get the most current version. Thanks to Terry and all that he does and making these routines available to us. Thank you Terry

About AutoCAD Tips

This blog serves as a knowledge base for myself (and anyone else) so that I can reference tips & tricks that I have learned and also refer others to it as well. I hope that this blog helps you learn at least one tip to make your drafting/design experience better.
This entry was posted in AutoLISP, Dimensions, New in 2011, Text. Bookmark the permalink.

6 Responses to AutoLISP: Match Dimension Style

  1. Peter Parker says:

    Hi
    When i select the dimension style to match I have this error
    Command: dm
    Select Dimension Style to match: ; error: AutoCAD variable setting rejected:
    “DIMDLRD” 1

    BTW I love your tutorials and lsp routines
    Thanks

    • AutoCAD Tips says:

      Thanks for the kind words Peter and for the head’s up with the issue that you are having with this routine. What version of AutoCAd are you using? I have tried it in both 2012 & 2013 without any problems so I am unable to duplicate the issue.

      I’m sure that the author of the routine (Terry) would like to know of this issue. A link to submit an issue or request for his site is found here: http://web2.airmail.net/terrycad/Suggestion.htm

      ~Greg

      • Terry Miller says:

        The variable DIMDLRD is obsolete in AutoCAD versions above 2004. I revised DM.lsp by removing the line with DIMDLRD. It is a couple of lines below the comment “; Ignore suppressing extension lines”. My revised version is on my website at web2.airmail.net/terrycad/LISP/DM.lsp Please remove that line in this post also so others can test and run the program. Besides matching one dimension to another, I use it to set current the dimension in the detail I want to be working on. Just hit enter or escape to the prompt Select Objects:
        Thank you,
        Terry Miller

      • AutoCAD Tips says:

        Terry,
        Instead of modifying the code in my blog post I have removed the code and placed a link to it on your site. This way it is easier to manage and visitors get the most current version. Plus there are times when people contact me with a problem with some code and i simply don’t have the time or knowledge to fix their issue. Another thing is that it will make it more obvious that I am not the author of these routines. Even though i try to make sure that there is a header in the routine with the author and the location of where i found the routine, i still get compliments from people along the lines of writing the code. hopefully this will help give credit to where it is due…

        Thanks for all you do and making these routines available to us.
        ~Greg

  2. Terry Miller says:

    The website http://web2.airmail.net/terrycad that hosted AutoLISP Exchange and Getting Started with DCL Dialogs has been moved to the new domain https://autolisp-exchange.com . All programs and files are free to download and share. Just click on a button to view the program, then right-click and choose Save as…

  3. Terry Miller says:

    Hi Greg,
    The website http://web2.airmail.net/terrycad that hosted AutoLISP Exchange, DM.lsp and Getting Started with DCL Dialogs has been moved to the new domain https://autolisp-exchange.com . All programs and files are free to download and share. Just click on a button to view the program, then right-click and choose Save as…
    Here is a direct link to DM.lsp:
    https://autolisp-exchange.com/LISP/DM.lsp
    Terry

Leave a comment