Results 1 to 3 of 3

Thread: Global scale variable in metric and imperial

  1. #1
    Active Member
    Join Date
    2004-07
    Posts
    50
    Login to Give a bone
    0

    Default Global scale variable in metric and imperial

    Hello all,

    I would like to have your comments about the proper way of setting/creating a global variable to represent my dwg scale when dealing with metric or imperial units. This is what I use now..

    in a detail w/ metric units and scale of 1:50, my
    DIMSCALE = 50 and a global variable say
    #dwgsc also set to 50.
    So for my lisp for changing a text height that I'd like to be 2.5mm, I have a line like this

    (setq ht (* 2.5 #dwgsc)) -> the actual text height is 125

    now this is the part which I'm not really sure if my approach is correct..

    for imperial units w/ a scale of 1/4"=1'-0" (which is closest to 1:50), I use the following settings
    for DIMSCALE = 48 and for
    #dwgsc = dimscale or 48 x (/ 10 254) = 1.89 where (/ 10 254) is a conversion of inch to mm
    so, for the same code above for changing text height, it'll still read the same

    (setq ht (* 2.5 #dwgsc)) -> but this time the actual height is 4.725" which is roughly 120mm close enough to the above 125mm

    Is this how you typically do your coding too? I can't exactly pinpoint what's weird expecially for imperial's, it's just that I have a feeling that there's another ways to go about this. Thanks for the replies in advance!!

  2. #2
    Member
    Join Date
    2002-05
    Posts
    7
    Login to Give a bone
    0

    Default Re: Global scale variable in metric and imperial

    This is the code I have used

    (setvar "TEXTSIZE" (* (expt (if (zerop (getvar "DIMSCALE")) 1.0 (getvar "DIMSCALE")) (getvar "TILEMODE")) (* 0.1 (expt 2.5 (getvar "MEASUREMENT")))))

    This gives the results 0.1 being the plotted text size for imperial units
    and 2.5 being the plotted text size for metric units it also accounts for Model or Paper Space. The code can be used in conjunction with a paperspace/modelspace reactor.

    My preference is not to assign a global variable as the scale often changes between drawings. The AutoCAD system variables are saved inside each drawing file.

    Regards,
    Ronso
    A2k2

  3. #3
    I could stop if I wanted to
    Join Date
    2002-02
    Location
    Kansas
    Posts
    487
    Login to Give a bone
    0

    Default Re: Global scale variable in metric and imperial

    in imperial units you are print at 1/4" = 1' or 1:48 not 1:50
    so 120mm / 48 = text at 2.5mm on your print
    the same text size in imperial units and metric units on your print.
    so you have it right just not the same text size in the drawing.

Similar Threads

  1. 2015: global/imperial
    By ehall690641 in forum AMEP General
    Replies: 3
    Last Post: 2015-03-24, 02:37 PM
  2. Grid Scale global variable
    By Wish List System in forum Civil 3D Wish List
    Replies: 0
    Last Post: 2014-09-17, 02:17 PM
  3. Imperial to Metric
    By rhayes.99001 in forum ACA General
    Replies: 1
    Last Post: 2008-06-18, 08:36 PM
  4. Scale List Units Metric / Imperial
    By H-Angus in forum ACA General
    Replies: 3
    Last Post: 2008-01-23, 09:27 AM
  5. tranfer drawing scale from imperial to metric
    By new@revit in forum Revit Architecture - General
    Replies: 2
    Last Post: 2004-02-17, 05:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •