Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutoCAD - Where to set dimspace variable to 0

17 REPLIES 17
Reply
Message 1 of 18
Rikkes
2637 Views, 17 Replies

AutoCAD - Where to set dimspace variable to 0

I use the dimspace command a lot. That's why I would like to set the dimspace variable to 0 instead of 'auto'. How can I do this?

 

[ The subject line of this post has been edited for clarity by @handjonathan Original: Where to set dimspace variable to 0 ]

17 REPLIES 17
Message 2 of 18
pendean
in reply to: Rikkes

If you mean you want that setting to be always zero in all your files without actively setting it, then you need to create an ACADDOC.LSP startup file with your variable setting(s) in it.

Start HELP in AutoCAD and in the search box type:
The ACADDOC.LSP File
Message 3 of 18
Rikkes
in reply to: pendean

Ok, that's what I want. But how?

 

Can somebody write the Lisp code for me please? I now how to load it then.

 

Thx.

Message 4 of 18
JoAnn_Hogan
in reply to: Rikkes

According to Help: 

Auto:

Calculates the spacing distance automatically based on the text height specified in the dimension style of the selected base dimension. The resulting spacing distance is twice the height of the dimension text.

 

DIMSPACE is not a system variable. It is a actual number you specify to space your dimensions out

 

You will need to find someone that knows VBA to code that for you. But I doubt that it will do what you expect... But have a look at it.

 

Here is some links on DIMSPACE

http://www.youtube.com/watch?v=ZXBByoozLZI

http://www.youtube.com/watch?v=sTrLskBXn9g

If this post solved your issue please mark as solved and Kudos are always welcome 😃

Jo - Ann
Twitter: @JoAnn_Hogan
Revit Architecture Certified Professional / Revit Structure Certified Professional / AutoCAD Certified Professional
Message 5 of 18
Rikkes
in reply to: JoAnn_Hogan

@JoAnn

 

I know that it isn't a system veriable but as it takes 'auto' as default value I think it must be possible to set this to 0 somewhere. But where...? 🙂

 

Ill try to write my own new command in lisp. If it works, I'll let you know!

 

 

I see that you live in South Afrika. I've been there last summer (winter for you). Beautiful country btw.

 

 

 

 

 

 

Message 6 of 18
doni49
in reply to: Rikkes

I've never used dimspace so I can't really attest to whether or not it's a sysvar.  But even if it's not, it's got a command line option which should allow the autolisp function  "Command" help you.

 

Try pasting the following into acad to see if it works -- it should set dimspace to 0 and you can use whatever value you want.  If it does, then paste it into the acaddoc.lsp file as Dean suggested.

 

(command "dimspace" "0")

 

Here' a link to the documentation on dimspace.

 

http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/index.html?url=WS1a91938...

 



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 7 of 18
JoAnn_Hogan
in reply to: Rikkes

I can't find this anywhere. How to change the default to 0. But try the lisp file thing.

If this post solved your issue please mark as solved and Kudos are always welcome 😃

Jo - Ann
Twitter: @JoAnn_Hogan
Revit Architecture Certified Professional / Revit Structure Certified Professional / AutoCAD Certified Professional
Message 8 of 18
JoAnn_Hogan
in reply to: JoAnn_Hogan

Sorry for the double post. But I just thought of this.

 

When you get it to have a lisp that sets your DIMSPACE to 0. Be careful that it does not prevent you from changing to a different value when needed. So for example. When you do a horizontal dimension and want to align the different dimensions it will be great. But when doing a vertical dimension, it might add all the dimensions on top of each other.

If this post solved your issue please mark as solved and Kudos are always welcome 😃

Jo - Ann
Twitter: @JoAnn_Hogan
Revit Architecture Certified Professional / Revit Structure Certified Professional / AutoCAD Certified Professional
Message 9 of 18
Anonymous
in reply to: Rikkes

READ THE WHOLE THING!! after all.... i took the time to type it...the least you can do is read it! it's worth the time, and SHOULD solve your problem with the AUTO option in the DIMSPACE command in AutoCAD. After extensive searching, and countless hours of trial and error.....lots and lots of error....this is
the FULLY FUNCTIONING lisp routine that I came up with in order to get the DIMSPACE command to be default to 0 and not ask you for a set distance. Which is what I wanted for my personal use. I have absolutely NO idea how it works, or why, i cannot explain lisp to you, all i know is that this little gem is a huge time saver for me. feel free to modify the "CX" to what ever suits you. i used that simply because i was running out of options to try. i then went into my customization file and edited my .pgp file where you set your shortcut keys and set the keystrokes to "AD" so the .pgp entry looks like this:

 

AD, *CX

 

of course, you can set it to whatever you want. i wish i could be of more help as to explaining the HOW it works, but all i know is that it works for me in AutoCAD 2017. I hope it works for you as well as it does for me. to put this into AutoCAD (at least the way i did it, i know there are other ways)

  1. open CAD (duh)
  2. open a blank dwg or dwt file
  3. go to the TOOLS menu button (i don't use the ribbon, i HATE the f$#@%g ribbon) so you'll have to find the appropriate tab, button, or whatever, i think it's under the MANAGE tab, and open the Visual LISP Editor.
  4. copy the text below the dotted line into your LISP editor and SAVEAS (whatever you want as long as it's under the LISP SOURCE FILES file type)it into a place you won't forget.
  5. Type CUI into your command line and on the left side under the ALL CUSTOMIZATION FILES scroll down until you see the fly-out for LISP FILES right click on that and click on the LOAD LISP and then go to your file where you saved this lisp, pick it and click open.
  6. hit APPLY , then OK. and wham bam thank ya ma'am!!! you're new time saving lisp code will run everytime you open an AutoCAD file!!

As i said before, I'm sure that there are other more effective ways of doing this process, but this is what i've come across and it was written for people by people (me) that don't know $h1T about lisp programming. All i can say is that i personally haven't had any problems with it. and....YES!! you can still use the default DIMSPACE command and input a distance that you want or if you choose to go with the AUTO option it will space the dimensions to 2X the text height by default. OH! and one more little tid bit of happy fun times...YES!! you can use window selection to pick your dims that you want to move down to the BASE DIMENSION.... a problem that some other lisp codes i tried would not let you do. i'd like to be all cocky and act like i knew what i was doing...but that just isn't the case. if you copy the lisp BELOW THE  LINE (if i have to tell you not to copy the line....) (>_<) then maybe you shouldn't be doing this at all....just sayin.... 😉


anyway...that all being said...feel free to copy, share, modify as you see fit. If you figure out a way to make it work better... awesome...I'd love to hear it. but i don't need any snotty emails about my crappy programming skills... I ALREADY KNOW! 🙂 

 

this post was not written in response to just any one post, it's just the culmination of several hours and days of scouring the interweb for an answer to this issue. and i wanted it out there in case i need it again. I would actually rather see AutoDesk just implement a command like the AMDIMALIGN command that is in AutoCAD Mechanical, into ALL of the AutoCAD variations and alleviate this situation altogether... ...hint...hint... 

---------------------------------------------------------------------------------------------------

(DEFUN C:CX ()
(Command "dimspace" pause (setq ss1 (ssget)) ss1"" "0.0"))

Message 10 of 18
Anonymous
in reply to: Rikkes

Someone suggested putting (princ) at the end.....but its been working fine for me as is...i may go back and try it at some point
Message 11 of 18
Rikkes
in reply to: Anonymous

Hmm, it doesn't work in acad 2011...

 

Message 12 of 18
Anonymous
in reply to: Rikkes

Really? Is dimspace an option in the 2011 version?

Jessye Ford
Owner, Grunt, & Overall Brains of
JET-X Custom Carving
www.jetxcc@gmail.com
(660)591-6540
Message 13 of 18
Rikkes
in reply to: Anonymous

Yes, dimspace is an option in the 2011 version.

 

I'll have to continue like I do now...

 

Thank's anyway!

 

Message 14 of 18
ronnie.mendoza518
in reply to: Rikkes

I'm actually looking for that answer today and figured it out myself today. My dimension style is annotative and using automatic dimension auto lisp but, the dimension space overlaps with each other or very far for some instance. The solution is you need to be unchecked the annotative, change the value of "Use overall scale of" then check the annotative again.

Dimspace.PNG

 

 

Message 15 of 18
tshekerov
in reply to: Anonymous

❤️ ❤️ ❤️ ❤️ ❤️

Message 16 of 18
TomBeauford
in reply to: Rikkes

DIMDLI (System Variable) Controls the spacing of the dimension lines in baseline dimensions.

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
Message 17 of 18
Rikkes
in reply to: TomBeauford

That wasn't the question... Thx anyway.

Message 18 of 18
TomBeauford
in reply to: Rikkes

From AutoCAD Help Commands for Dimension Spacing https://help.autodesk.com/view/ACD/2023/ENU/?guid=GUID-9879A8BD-817A-4713-B0D4-3405C280A751
Lists DIMSPACE as the Command
and DIMDLI as the System Variable that controls the spacing of the dimension lines in baseline dimensions. https://help.autodesk.com/view/ACD/2023/ENU/?guid=GUID-D2D1AF3D-004B-4C47-BABE-22B7327EE128
Right answer, you just asked about the wrong name for the system variable. The system variable DIMSPACE doesn't exist.
64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost