Jump to content

Recommended Posts

Posted

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!

Posted

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?

Posted

What about units written in note blocks? They aren't dimensions, just text.

Posted

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.

Posted

Hence my frustrations, haha.

 

Is there a quick autolisp routine that would take care of just the dimensions?

 

Thanks,

 

Ome

Posted

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.

Posted

Also... regarding your...

  1. 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".
  2. 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.

Posted

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.

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...