Jump to content

Scaling Entites for Metrics/English Question


Recommended Posts

Posted

Hello: I am working on a subroutine in .net api called ScaleEnt. It first recognizes the units the user wishes to scale in (e.g. inches, centimeters, etc;)

 

After, it asks the user to select the entities they want to scale, asks the user to enter the desired height they want to scale to....and also to select a insertion point for where to place the entities.

 

I have my code working...for everything except for working in conjunction w/ Units specified. Currently, it just works for inches.

 

I wanted to verify that I must add something to my code in order to scale for units - I read that in cad, a unit is a unit...so, I think I'm confused about scaling and scaling for a specificed unit of measure.

 

Can someone please help me to understand?

 

Thanks,

Proctor

Posted

I think I understand better now...should have read AutoCad's help:

 

It says, "Before you start to draw, you must decide what one drawing unit represents based on what you plan to draw. You can convert between systems of measurement by scaling it.

 

Every object you create is measured in drawing units. Before you start, you must decide what one drawing unit will represent based on whatyou plan to draw. For example, one drawing unit typically represents one millimeter, one centimeter, one inch etc.

 

So now, my question is, if the drawing was done in inches, and it's height meaures 12 in and they want to simply convert it to centimeters..keeping the same size, do I need to do anything? It seems, If I got this right, I need to somehow change the setting programatically in cad so that it sees the unit as centimeters. Does this sound right?

 

 

thanks,

Proctor

Posted

There are many things to consider here. I'll try to explain what I do an hope that will give you further ideas.

 

Until recently all my drawings have been "unitless", and since I only ever draw in metric, 1 unit = 1mm. Therefore my default text height has been 2,5mm.

 

If I am given an imperial drawing of (say) a 12" square part with text at 0,125" height I will scale that part at 25,4:1. Therefore the size becomes 12" x 25,4 = 304,8mm and the text comes in at 25,4/8 = 3,175mm. If I were to insert it with no conversion it would now be a 12mm square with unreadable text.

 

I have now started defining my drawings as millimeter as AutoCAD has a habit of scaling unitless files by 25,4 irrespective of how you have the variable set up.

Posted

dbroada: thanks for your response. I think I'm starting to understand a bit better. If, for example, I have an entitiy that was drawn in inches and has a height of 12 inches....and the user wishes to convert this to centimeters, they would need to multiply 12 * 2.54 for a scaling factor...because for one unit measured in inches for length equals 2.54 centimeters. does this sound like I'm getting it right?

 

if it's a new drawing, and the current default units for it are set to inches, and the user wants to change this so that it will be in centimeters, what command would they give? is it measureinit? i think that changes out the default ....and they just want to change the settings for this drawing.....so perhaps they should use: insunits command?

 

thanks again for your response.

Proctor

Posted
dbroada: thanks for your response. I think I'm starting to understand a bit better. If, for example, I have an entitiy that was drawn in inches and has a height of 12 inches....and the user wishes to convert this to centimeters, they would need to multiply 12 * 2.54 for a scaling factor...because for one unit measured in inches for length equals 2.54 centimeters. does this sound like I'm getting it right?
That is correct.

 

if it's a new drawing, and the current default units for it are set to inches, and the user wants to change this so that it will be in centimeters, what command would they give?
I think it is UNITS. I have it set in my .dwt file so I don't have to change anything. In fact my .dwt is still set to UNITLESS and I apply millimetres to any block I create. You can change the units at any time but any item in the drawing will remain in units, it will not change size.
Posted

thanks so much for confirming.

 

also, when you say "I apply millimetres to any block I create" if you simply created - say a polyline, how would you handle the units for this entity?

 

thanks again,

Proctor

Posted

a polyline would just be drawn 24 units long. I know I'm working in metric so I don't need to define it.

 

BLOCKS are a collection of entities for reusing, often in other drawings. So if I was to create a block of a psu 40mm wide by 80mm high I would draw my rectangle. Put a bit of text in there that says PSU and create a block of the rectangle & text. When in the BMAKE screen I define the units. Now if I WBLOCK the block it will be available as a metric block.

 

Now comes the clever part. If you start an imperial drawing I can (should be able to) INSERT my new block and it will come in already scaled as AutoCAD knows this drawing is imperial and my block is metric. It may be clever but I preferred it the old way as it doesn't always get it right!

Posted

i see now...that's what I was thinking about the blocks..but wanted to confirm. so much to learn.

 

thanks for all your help today.

 

proctor

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