CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 8089
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

 

HelpCAD discussion

 
CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.

How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedFormula

 Post Reply Post Reply
Author
shaikh View Drop Down
Newbie
Newbie


Joined: 15.Sep.2010
Location: Pakistan
Using: Autocad2010
Status: Offline
Points: 10
Direct Link To This Post Topic: Formula
    Posted: 04.Nov.2010 at 06:58
Dear All
            If we want a scale 1:20 then through scale command we only give 20
so after this if we have line=100 its length will be 2000.But the question is that I want the scale 20 times to decrease.For this how much scale I will give and what is the formula to calculate this.Please guide me in this matter.
taqqi
Back to Top
linhoreka View Drop Down
Newbie
Newbie


Joined: 04.Nov.2010
Location: Vietnam
Using: AutoCAD2008
Status: Offline
Points: 16
Direct Link To This Post Posted: 04.Nov.2010 at 14:42
Very easy. The display of the dimension is control by 2 variables: Dimscale and Dimlfac. Dimscale is the scale of the text and arrows. The Dimlfac (dimline factor) control the dimline value. With Dimlfac = 20, the line of 100 length would be dim as 2000. With Dimlfac = 1/20 = 0.05, the line of 100 length would be dim as 5.
Here is 2 useful lisps to control these 2 variables, avoiding create new dimstype each time you want to change their values:


;1. Copy these following lisp lines (in blue text) to an empty lisp file. Save it in any name as you like
;2. Load the file to AutoCAD (better put them in StartUp list if you find it is useful)
;In AutoCAD command line: type "dsc" for Dimscale setting, "df" for DimlFac setting command
;Cheer :)


;DSC AND DF COMMANDS FOR ADJUSTING SILENTLY DIMSCALE AND DIMLFACT VARIABLES
;++++++++ DF DIMLFAC++++++++++++
(defun C:df (/ dimlf odf)
  (setq odf (getvar "dimlfac"))
  (setvar "cmdecho" 0)
  (prompt (strcat "The current Dimlfac is " (rtos odf 2 5)))
  (initget 128)
  (setq dimlf (getreal "\nEnter DimlinearFactor <or press any keyboard to get dimension style from object>  "))
  (if dimlf
    (if (numberp dimlf)
      (setvar "dimlfac" dimlf)
      (restoreDimstyle)
      )
  )
  (princ)
);end defun
;++++++++DSC DIMSCALE+++
(defun C:dsc (/ dimsc ods)
  (setvar "cmdecho" 0)
  (setq ods (getvar "dimscale"))  
  (prompt (strcat "The current Dimscale is " (rtos ods 2 5)))
  (initget 128)
  (prompt "\nDimscale standard value should be one of the following values: 1, 2, 5, 10, 20, 25, 50, 100, 200, 500, 1000, 2000 ...")
  (Setq dimsc (getreal (strcat "\nEnter the Dimlinear Scale <" (rtos ods 2 5) "><or press keyboard to get the dimension style from object>  ")))
  (if dimsc
    (if (numberp dimsc)
      (setvar "dimscale" dimsc)
      (restoreDimstyle)
      )
    )
  (setvar "LTSCALE" (getvar "DIMSCALE"))
  (princ)
);end defun


(defun restoreDimstyle (/ dimlf dimsc e el en)
  (setq e (car(entsel)))
  (if (null e)(exit))
  (setq 
el (entget e)
en (cdr(assoc 0 el))
)
  (if (or (= en "DIMENSION")(= en "LEADER"))
    (progn
      (command "-dimstyle" "restore" "" e)
      (graphscr)
      )
    (prompt "No dimension selected")    
    )
  (setq dimlf (getvar "dimlfac")
dimsc (getvar "dimscale"))
  (prompt (strcat "\nThe current Dimlfac is " (rtos dimlf 2 5)))
  (prompt (strcat "\nThe current Dimscale is " (rtos dimsc 2 5)))
  (princ)
  );end defun

Back to Top
CarlB View Drop Down
Senior Member
Senior Member


Joined: 16.Oct.2009
Location: United States
Status: Offline
Points: 321
Direct Link To This Post Posted: 04.Nov.2010 at 23:55
If I understood your question...
If you want to decrease a scale by a factor of 20, you have 2 ways you could enter this on the command line;
1- use a calculator, 1/20 =.05. So enter ".05" for the scale
2-You can enter ratios of whole nubers on the command line; so for the scale enter "1/20"
 
But....the golden rule of cad drawings is to draw ebverything real worls scale. Its's only when you put drawing to paper (or pdf) that you need a drawing scaled, so you handle this with plot scales, or better by plotting from paperspace, with a scaled viewport showing modelspace objects.
Back to Top
shaikh View Drop Down
Newbie
Newbie


Joined: 15.Sep.2010
Location: Pakistan
Using: Autocad2010
Status: Offline
Points: 10
Direct Link To This Post Posted: 06.Nov.2010 at 12:40
Thanks a lot for reply me and your reply is Ok,but my question is that if we have DWG in model space of different sections and these sections scale is 1:20 then we give scale factor in DIM type 0.400.So how it will come because I have a DWG like that.I will wait for your reponse.
taqqi
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,563 seconds.