Snap settings and precision in acad.lsp
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Snap settings and precision in acad.lsp

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
David Allen
Guest





Posted: Fri Apr 08, 2005 8:25 pm    Post subject: Snap settings and precision in acad.lsp Reply with quote

I am thinking of enforcing a company standard of 1/2 snap settings for all linework
I am thinking of using

(if (= (getvar "TILEMODE") 1)
(progn
(command "snap" "0.5")
(command "grid" "snap")
)
)

So that if you open a sheet you do not get the snap settings in paperspace
But if you open a base drawing then you get the settings.

How can I set the unit precision to the max 8 places.
I don't want to use (command "-units" "4" "256" "1" "8" "0" "Y") as you might be using decimal instead of architectural.

Also how can I modify all of my dimension styles to use 256 level of accuracy?
This code only modifys the current style

(setq dimstyle (getvar "dimstyle"))
(setvar "dimdec" 8)
(command "dim" "save" dimstyle "y" "e")

Any comments or reasons not to set this?


David

Back to top
Kent Cooper, AIA
Guest





Posted: Sat Apr 09, 2005 12:02 am    Post subject: Re: Snap settings and precision in acad.lsp Reply with quote

The LUPREC system variable is a single one that controls precision in all
the different kinds of Units -- if set to 8, you get 8 decimal places in
Decimal units or down to 1/256" in Architectural units. So you can (setvar
"LUPREC" 8) and not go through the Units command. (You could also do it
through Units if you put in returns to accept the current settings for the
other variables.) But it doesn't control precision within Dimensions, so
your use of DIMDEC is appropriate (see also DIMRND, though I'm not quite
sure what the difference is). I don't have any bright ideas for updating
all styles, but I think there's related stuff in the newsgroup history
somewhere.
--
Kent Cooper


"David Allen" wrote...
Quote:
I am thinking of enforcing a company standard of 1/2 snap settings for all
linework
I am thinking of using

(if (= (getvar "TILEMODE") 1)
(progn
(command "snap" "0.5")
(command "grid" "snap")
)
)

So that if you open a sheet you do not get the snap settings in paperspace
But if you open a base drawing then you get the settings.

How can I set the unit precision to the max 8 places.
I don't want to use (command "-units" "4" "256" "1" "8" "0" "Y") as you
might be using decimal instead of architectural.

Also how can I modify all of my dimension styles to use 256 level of
accuracy?
This code only modifys the current style

(setq dimstyle (getvar "dimstyle"))
(setvar "dimdec" 8)
(command "dim" "save" dimstyle "y" "e")
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB