ILoveMadoka Posted March 1, 2010 Share Posted March 1, 2010 We use two decimal places as a standard. Is it possible to have an app that when run will return a 3 place distance under these conditions? (ie: Let's say I have a distance of .375 which when dimensioned displays .38, I want to verify the distance without having to change my units to three decimal places so that if I pick a distance I get the actual .375) I'd like to be able to pick the distance (two points) and have the 3 place distance returned to the command line. If there is a simpler workaround, Please instruct me!! Thanks!! Quote Link to comment Share on other sites More sharing options...
ReMark Posted March 1, 2010 Share Posted March 1, 2010 Why not just change the precision of your drawing length units? I think AutoCAD goes out to 8 decimal places. Precise enough for you? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 1, 2010 Share Posted March 1, 2010 I want to verify the distance without having to change my units to three decimal places Why not just change the precision of your drawing length units? ... ... Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 1, 2010 Share Posted March 1, 2010 Perhaps: (defun c:dist2 (/ p1 p2 Units Prec) (setq Units [color=Red][b]2[/b][/color] Prec [color=Red][b]3[/b][/color]) (and (setq p1 (getpoint "\nFirst Point: ")) (setq p2 (getpoint "\nSecond Point: " p1)) (princ (strcat "\nDistance: " (rtos (distance p1 p2) Units Prec)))) (princ)) Quote Link to comment Share on other sites More sharing options...
ReMark Posted March 1, 2010 Share Posted March 1, 2010 Maybe his DIST command broke and he doesn't know what the units command is? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 1, 2010 Share Posted March 1, 2010 Maybe his DIST command broke and he doesn't know what the units command is? You know me Mark - ANYTHING is worth a routine... Quote Link to comment Share on other sites More sharing options...
ReMark Posted March 1, 2010 Share Posted March 1, 2010 You are most accommodating Lee. Maybe I don't get it. Type Dist2 and pick two points to obtain a distance between them to three decimal places. OK. That part I do get. But if I set up my template with Units set to three decimal places and type the command alias for the distance command (di) and pick my two points how is that different? Unless of course I want to round off for display purposes whilst retaining three decimal point accuracy. I think even the rounding off could be set up in DimStyles, right? Quote Link to comment Share on other sites More sharing options...
ILoveMadoka Posted March 1, 2010 Author Share Posted March 1, 2010 OK... I guess I can't assume anything here.. We have two decimal places setup as our STANDARD for all dimensions. If you pull a DIST command, you get a two place decimal distance. (Am I totally off base acad newbie with this??) There are clients that force (and enforce) a strict 2 decimal place standard. To clarify... I HAVE TO HAVE MY UNITS SET TO TWO DECIMAL PLACES! What I'm looking for (and haven't tried the code yet) is to run the DIST command WITHOUT changing ANYTHING yet still getting a 3 decimal place answer all the while my drawing remains at 2 decimal places per our company standard. It is only for doing Q/A. If I allow users to change the units they'll forget to set it back and then place dimensions with three decimal places which creates it's own set of problems. I'm sorry but if you've had drafters work for you, you know have to idiot proof everything... In my best neanderthal voice... DUHHHHHH... Units Command? Never heard of that before!!! Is that new?? Quote Link to comment Share on other sites More sharing options...
ILoveMadoka Posted March 1, 2010 Author Share Posted March 1, 2010 Lee, As always your code works flawlessly and is exactly what I was looking for! I appreciate both your knowledge (and sense of humor!) Thanks for putting up with, and helping all of us!! Quote Link to comment Share on other sites More sharing options...
eldon Posted March 1, 2010 Share Posted March 1, 2010 What you see in the command line and what you see in the dimensions are set up completely differently. The dimensions may be obligatory at two decimal places, but that does not prevent you from enjoying as many decimal places as you please in the command line. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 1, 2010 Share Posted March 1, 2010 Lee, As always your code works flawlessly and is exactly what I was looking for! I appreciate both your knowledge (and sense of humor!) Thanks for putting up with, and helping all of us!! No worries - I'm happy to code, and leave the actual AutoCAD'ing to others Quote Link to comment Share on other sites More sharing options...
ILoveMadoka Posted March 1, 2010 Author Share Posted March 1, 2010 Ahhhhh.... Dimstyle vs Units... I see said the blind man! Quote Link to comment Share on other sites More sharing options...
alanjt Posted March 1, 2010 Share Posted March 1, 2010 So sad. Quote Link to comment Share on other sites More sharing options...
ReMark Posted March 1, 2010 Share Posted March 1, 2010 The UNITS command has been around for quite a while. Any newbie should have encountered it in AutoCAD basics. I believe there is a way, in DimStyle to force AutoCAD to round up or down from three places to two. If you draw/design to an accuracy of three decimal places I would think that a "good" thing. Making you round off to two places, in my opinion, is not necessarily a good thing. 0.375 becomes 0.38 and 0.372 becomes 0.37? Quote Link to comment Share on other sites More sharing options...
ReMark Posted March 1, 2010 Share Posted March 1, 2010 You mean to say you have never come across this? Simply amazing. Quote Link to comment Share on other sites More sharing options...
ReMark Posted March 1, 2010 Share Posted March 1, 2010 Yep, I found it. DimStyles. Setting the precision of Round off option. The straight line after the two zeros is not a "1" it's where my cursor ended up. So as you see, you had at your fingertips the means to do what you wanted to do all along as provided for by your AutoCAD program. Seek and ye shall find. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 1, 2010 Share Posted March 1, 2010 ReMark, I wouldn't be that harsh... the way I see it is that ILoveMadoka knew about the precision in the UNITs command, but overlooked the precision as set in the dimstyle. Quote Link to comment Share on other sites More sharing options...
Crazy J Posted March 2, 2010 Share Posted March 2, 2010 While it may not be common or make the best sense, I can see either different designers within your own company (or engineers for that matter) or different customers calling things out in different ways. So I don't think the original reasoning driving ILoveMadoka's inquiry is all that strange. What one engineer calls 3/8th, the model builder in the shop might call .375, and the new intern who just learned about significant digits but has yet to take a metrology class might call .38 (not realizing that the model maker will interpret two decimal places to +/- 0.010 and three decimal places to +/- 0.005). I once had an intern working in my group who asked for a very basic tool to be made with +/-0.001 just because the class she had recently taken talked about machine shop processes that could handle such tight tolerances. Sure, it could be made to that tolerance, but at 5X the lead time and cost! And when +/-0.05 is plenty, why go to the extra trouble. So, depending upon the office environment, the number of CAD users and end users of the drawings, and the nature of the product, I could see where such functionality would be good to have. And don't forget that one guy in the office who drafts everything in metric just to be a pain. Then you have to figure in the roundoff consequences of the conversion. Quote Link to comment Share on other sites More sharing options...
Crazy J Posted March 2, 2010 Share Posted March 2, 2010 What you see in the command line and what you see in the dimensions are set up completely differently. The dimensions may be obligatory at two decimal places, but that does not prevent you from enjoying as many decimal places as you please in the command line. Eldon, are you saying there is a setting somewhere to change the precision of the numbers returned in the command line (like from a dist inquiry)? If so, please instruct me as to how to do that. This would be useful to me at times, and I have not come across that customization anywhere yet. Thanks! Quote Link to comment Share on other sites More sharing options...
Cad64 Posted March 2, 2010 Share Posted March 2, 2010 Eldon, are you saying there is a setting somewhere to change the precision of the numbers returned in the command line (like from a dist inquiry)? If so, please instruct me as to how to do that. This would be useful to me at times, and I have not come across that customization anywhere yet. UNITS, as illustrated by ReMark above. And as Eldon stated, your Dimstyle units and your Drawing units are two separate things. You can have your Dimstyle units set to 2 places but still have your Drawing units set to 4 places. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.