Jump to content

AutoLisp Dim Command


Nick1940

Recommended Posts

I type the following command: (command "dim" "scale" "0.06" ""). AutoCAD accepts the command and tells me I must input "exit" to exit the command. I do this on the command line and it works fine, but I don't know how to either incorporate the "exit" command into the above command or follow the above command with a second AutoLisp command executing the "exit" command.

 

Please Help if you can!

Link to comment
Share on other sites

Thanks David. I tried the "_.DIM1" - it opened the dialog box, which I did not know how to do (thanks) but was not what I wanted to do.

Link to comment
Share on other sites

Thanks David. I tried the "_.DIM1" - it opened the dialog box, which I did not know how to do (thanks) but was not what I wanted to do.

 

(command "_.DIM1" "_Scale" 2)

 

Should work. No need for any closing CarriageReturns -David

Link to comment
Share on other sites

Thanks again Dave. I tried it but this time it didn't even open the dialog box. But that's OK because the setvar command worked great. I am going to use the set var command to change the osnap setting as well. -Nick

Link to comment
Share on other sites

If you use this simple Dumpit and pick a dim you will expose all the variables that can be set and there are a lot.

 

(vlax-Dump-Object (vlax-Ename->Vla-Object (car (entsel "pick an object"))))

Link to comment
Share on other sites

Thanks BIGAL. When I first saw your post I thought it meant "big gal" now I see it is actually "big al". Anyway, I inserted the above command into my command line and it asked me to "pick a point". I wasn't sure what to do at that point so I tried a few things none of which produced anything of value. I may be too much of a tenderfoot to know how to use the command. BTW I hope you are enjoying summer in Aussi-Land. We are of course in the middle of winter and just got about a foot snow today with more coming tomorrow.

Link to comment
Share on other sites

Just copy and paste to command line and pick a dimension or a circle or a pline etc. Need to look at Text screen.

 

Its 32 centigrade at the moment.

 

Made a mistake should have been BIG Al, Alan H.

Link to comment
Share on other sites

  • 2 years later...

I recently upgraded from autocad 2013 to 2020, I think starting in 2016 the dim command is now different you can now pick your points and drag to horizontal, vertical or aligned with out 

having to select hort. vert or align first, which is really cool. I would like to use this command in one of my lisp routines that draws dimensions in the drawing but when I type in

(command "dim" pt1 pt2 etc.) in an autolisp file I get the old dim command that ask you for Horizontal, Vertical or aligned first instead of letting you drag to hort. vert. or align.

Is there a way to use the new dim command (as of 2016) in an autolisp file?

 

Any help would be appreciated!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...