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.


Link to code here:

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.

4 Responses to AutoLISP: Match Dimension Style

  1. Peter Parker says:

    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

    • 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:


      • 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 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:

        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.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s