Ometheus Posted March 13, 2014 Posted March 13, 2014 Hello, I'm trying to create a routine that will change all units and associated values from inches/feet to millimeters. Right now we have technical drawings with measurements in feet and inches, as well as notes that specify dimensions in inches, and would like a routine to automatically change these to metric. Thanks! Quote
MSasu Posted March 13, 2014 Posted March 13, 2014 You were looking to scale the sketches? Are you aware that may just convert the dimensions to display the metric equivalent by adding a scale factor (25.4 for drawings made in inches) in dimension style? Quote
Ometheus Posted March 13, 2014 Author Posted March 13, 2014 What about units written in note blocks? They aren't dimensions, just text. Quote
Snownut Posted March 13, 2014 Posted March 13, 2014 Changing the notes opens up a whole new dilemma, you will need to parse all the note files, and determine just what numbers are measurements and what numbers are not, not all numbers will be measurements. Assuming you would only want to change the measurements. Quote
Ometheus Posted March 13, 2014 Author Posted March 13, 2014 Hence my frustrations, haha. Is there a quick autolisp routine that would take care of just the dimensions? Thanks, Ome Quote
BIGAL Posted March 14, 2014 Posted March 14, 2014 OK is 1 foot = 300mm or 304.5mm depends on where its getting made. Sometimes it is not a direct convert Imperial to metric dont know what you are converting but you should consider this problem. Quote
cwake Posted March 14, 2014 Posted March 14, 2014 Also... regarding your... Notes:- Are the imperial text values in your notes simply numeric values (either integer or decimal values) that need to be scaled / adjusted? Or are they mixed up with feet and inch designations? As in displayed as 3' 10". Dimensions:- Are the dimensions associative? If they are, wouldn't it be better to leave them as associative and implement MSasu's suggestions of scaling either the objects and dimensions together or changing the dim style scaling value? If they are NOT associative, how are they designated? As decimal numeric values? Or again, with feet and inch symbols? As soon as you introduce feet and inch symbols (and potentially other characters like space, dash, etc. or worse, inconsistent designations) the effort of coding moves closer toward the effort of doing it manually. Also, to code something that works properly in all cases you would have to consider the possible presence of fields, unicodes, stacked text, formatting strings, numeric date text (05/04/14 or 05-04-14) and radial text (R.17 - is that 17 or 0.17?). Using a regular expression search engine can help with sifting through these, but I think you would have to a) have very consistent data formatting throughout to expect consistent conversion, and b) post an example drawing to help explain what form the data is in. Quote
irneb Posted March 14, 2014 Posted March 14, 2014 For the notes you could parse the numbers using this idea: http://www.theswamp.org/index.php?topic=38779.0 Though I'm also a bit sceptical if a straight mathematical conversion is adequate in all situations. E.g. in this country we use clay bricks a LOT. Some (of the older crowd) would refer to a wall as 9", but then the metric measurement isn't 228.6mm (as the 25.4 multiplier suggests) it's actually 220mm or (if the bricks are slightly off standard) 230mm. The rule of thumb here is to round the metric value to the nearest 5mm (or sometimes 10mm) as it's near impossible to build any wet-works to closer tolerances than that. Quote
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.