Print Page | Close Window

Creating a Reference Dimension Macro

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=7411
Printed Date: 31.May.2026 at 21:31


Topic: Creating a Reference Dimension Macro
Posted By: deucesjr
Subject: Creating a Reference Dimension Macro
Date Posted: 28.Feb.2012 at 23:40
To show that certain dimensions are references we put parenthesis around them, ex: (13'-0"). Normally I just use a standard dimension then edit it to add the parenthesis or create a seperate dimstyle that has the parenthesis in it. I have tried copying the Linear Dimension command and modifying the macro to add the parenthesis but have yet to figure out how to make it work correctly. I just want to click the command and have the parenthesis automatically placed around the dimension. Any help with this will be greatly appreciated, thanks.



Replies:
Posted By: heinsite
Date Posted: 29.Feb.2012 at 03:35
Have you tried creating a special DIMSTYLE for this using the "(" as prefix and the ")" as a suffix?
 
Dave.
 
  http://www.cadforum.cz/forum_en/uploads/20120229_034613_DimStyleParens.pdf - uploads/20120229_034613_DimStyleParens.pdf


-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite


Posted By: philippe JOSEPH
Date Posted: 29.Feb.2012 at 08:09
I think that when dimensions are between parenteses they are just not references but additional dimensions not to be used in the definition of the part but "free" dimensions for the workers fabricating that part ( length of profiles, developped length etc... ).
For "references" dimensions I would put the dimension text in rectangles that you can set with a negative distance under the text to be set for example in a special DIMSTYLE ( if your text is 3.5 high, try -1 for the distance under the text ).


Posted By: deucesjr
Date Posted: 29.Feb.2012 at 17:45
Using the () to show reference dimensions is a client standard not something I can modify. I was just wondering if there was a way to add the () to the dimlinear macro and make it so that when using the new toolbar the dimensions come out like so: (1'-0").


Posted By: John Connor
Date Posted: 29.Feb.2012 at 18:07
Can you post a copy of this "macro"?

I think heinsite's suggestion for editing your dimstyle (prefix and suffix) is the best approach.


-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: deucesjr
Date Posted: 29.Feb.2012 at 18:19
We already use a seperate dimstyle, what we want is to elimate the need for a second dimstyle.


Posted By: heinsite
Date Posted: 29.Feb.2012 at 23:06
And you propose to do this with a macro somehow?  What have you tried so far?  What procedure do you think is going to make this work?
 
Dave.


-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite


Posted By: John Connor
Date Posted: 01.Mar.2012 at 11:15
Maybe it could be done globally using a lisp routine?

-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: heinsite
Date Posted: 01.Mar.2012 at 22:12
Probably, but we're getting into the territory of making something very simple very complicated.
 
This doesn't sound to me like something that needs to be done all that often.  So I'm having kind of a hard time understanding why not just  double click any dims needing parens and add them when needed.  Done.  Or, if several are calling, just switch to the custom DIMSTYLE and whack all in one go.  Done and done.
 
I'm all for automating and programming but I always ask myself beforehand one important question: Will the time I'm about to spend programming this solution be paid back or not?  And the key to that is how often I expect to need the routine to begin with.
 
Dave.


-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite


Posted By: deucesjr
Date Posted: 02.Mar.2012 at 02:43
I haven't done much in the way of trying to modify the macro as of yet. I was hoping someone might have tried something similar, which would save me some time.
 
We have over 300 designer/drafters working for us, so even a small time saver will equal a savings. We use reference dimensions on almost all drawings we do and we work on a ton of drawings per year. If I have a drawing with multiple dimstyles then I have to create a reference dimstyle for each of those. So if I have 4 different scale factors in a drawing that would equal 8 dimstyles.
 
Yes it's easy enough to double click the dimesion and just add the parentheses if there are only a few dimensions. I am currently working on a drawings set with over 50 drawings and roughly 90 details. That's a lot of double clicking.
 
I was just trying to see if anyone had ever tried creating a new command to accomplish something similar.


Posted By: heinsite
Date Posted: 02.Mar.2012 at 03:30
One huge time saver for you might be to move into using annotative dimensions.  By the sound of it you currently may not be.  That would immediately take all the "scale factor" stuff totally out of the equation.  It may mean a bit of stress and work up front, but long term it'll pay off big.
 
I can see the problem more clearly now when you explain different styles for various scale factors!
 
Dave.


-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite


Posted By: deucesjr
Date Posted: 02.Mar.2012 at 03:53
Believe it or not we can not use annotative dimensions with this client. For some unknown reason when we use annotative dims and try to put the drawing into the clients server it screws all dims/text up. We tried, very unsuccessfully, using annotative dimensions.


Posted By: heinsite
Date Posted: 02.Mar.2012 at 20:41
Too bad. 
 
Then we've circled back to where we were about midway in this thread.  Let's see the macro code you've tried so far.  Short of a LISP routine that looks like the way you're going to have to go.  But it's not going to be automagic... I have a feeling you'll still be doing them one at a time.
 
Dave.


-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite



Print Page | Close Window