+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Senior Member
    Using
    Inventor 2012
    Join Date
    May 2007
    Posts
    215

    Default n00b questions... easy ones

    Registered forum members do not see this ad.

    hi there, n00b on the block here,

    just wondering how i go about inputting dimensinos as feet and fractional inches? is there a setting i have to change? or do i need to make a lisp routine for it?

    also how do i make acad calculate fractions for me?

    for some reason acad says (/ 3 4) = 0...
    decimal precision is set to 5 0 (zero's) after the decimal place.

    cheers
    Last edited by Hickoz_bro; 21st May 2007 at 10:50 pm.

  2. #2
    Forum Deity
    Using
    AutoCAD 2002
    Join Date
    Sep 2006
    Location
    East Sussex, U.K.
    Posts
    3,560

    Default

    Quote Originally Posted by Hickoz_bro View Post
    also how do i make acad calculate fractions for me?

    for some reason acad says (/ 3 4) = 0...
    decimal precision is set to 5 0 (zero's) after the decimal place.

    cheers
    I think AutoCAD is getting confused with the input. It thinks that you are inputting integers, and therefore gives you the result as an integer.

    Try putting the decimal point in - (/ 3. 4.) and you should get what you want.

  3. #3
    Super Member profcad's Avatar
    Computer Details
    profcad's Computer Details
    Operating System:
    Windows 7 Ultimate
    Computer:
    Dell
    CPU:
    Dual - Six-Core Xeon
    RAM:
    12GB
    Graphics:
    NVida 4400
    Monitor:
    DUAL 24" WIDESCREEN
    Discipline
    Education
    profcad's Discipline Details
    Occupation
    Professor Of CAD
    Discipline
    Education
    Using
    Revit 2014
    Join Date
    Dec 2005
    Location
    Oklahoma City, OK
    Posts
    829

    Default

    In LISP an Integer divided by an Integer returns an Integer. That is why (/ 3 4) returned 0. LIke eldon stated use decimal points.

    For values less then 1 use a leading 0. For example ( / 0.75 0.50), if you don't use leading zeros you will get the following error message misplaced dot on input
    John Helton
    Professor of CAD
    Oklahoma City Community College
    Oklahoma City, OK

  4. #4
    Senior Member
    Using
    Inventor 2012
    Join Date
    May 2007
    Posts
    215

    Default

    sweet, thanks for that guys...

    how about the input in feet/inches (say 18' 4 1/2")? is there an easy way? or am i going to have to write more lisp?3


    another query i have is what's the command to TOGGLE between model, and layout (not model space, and paperspace)... say for arguments sake, i'm in model, and i enter (shortcut) 'W' it will take me to layout, and if i'm in layout the same shortcut will take me to model...

  5. #5
    Super Member profcad's Avatar
    Computer Details
    profcad's Computer Details
    Operating System:
    Windows 7 Ultimate
    Computer:
    Dell
    CPU:
    Dual - Six-Core Xeon
    RAM:
    12GB
    Graphics:
    NVida 4400
    Monitor:
    DUAL 24" WIDESCREEN
    Discipline
    Education
    profcad's Discipline Details
    Occupation
    Professor Of CAD
    Discipline
    Education
    Using
    Revit 2014
    Join Date
    Dec 2005
    Location
    Oklahoma City, OK
    Posts
    829

    Default

    When using a LISP function like (getdist) it will accept input in your current units. So setup your drawing for architectural or fractional units.

    TILEMODE will toggle between paper space and the model tab

    There is also a command called MODEL that will switch you to the model tab.
    John Helton
    Professor of CAD
    Oklahoma City Community College
    Oklahoma City, OK

  6. #6
    Senior Member
    Using
    Inventor 2012
    Join Date
    May 2007
    Posts
    215

    Default

    as far as i can tell setting the drawing up for archi/fractional units is only for dimension display, not actual input (unless i'm missing something)

    and tilemode DOES NOT toggle between layout and model tab... tilemode is a system variable which needs to be changed in order to switch. the command i'm after is specifically a TOGGLE... i've written some lisp that does the job, but can't remember what the acad command is for it

  7. #7
    Super Member profcad's Avatar
    Computer Details
    profcad's Computer Details
    Operating System:
    Windows 7 Ultimate
    Computer:
    Dell
    CPU:
    Dual - Six-Core Xeon
    RAM:
    12GB
    Graphics:
    NVida 4400
    Monitor:
    DUAL 24" WIDESCREEN
    Discipline
    Education
    profcad's Discipline Details
    Occupation
    Professor Of CAD
    Discipline
    Education
    Using
    Revit 2014
    Join Date
    Dec 2005
    Location
    Oklahoma City, OK
    Posts
    829

    Default

    Tilemode 1 = Model space
    Tilemode 0 = Last layout

    You would use tilemode in a lisp program see below...

    Code:
    (defun c:tmode ( / )
      (if (= (getvar "Tilemode") 0)
          (setvar "tilemode" 1)
          (setvar "tilemode" 0)
        )
      (princ)
      )
    As for input in LISP, you can enter the distance as feet and inches. If your units is setup to architectural.

    However, when inputting architectural distance in AutoCAD and AutoLISP you must put the dash between the whole number and fraction like this...

    12'4-1/2"

    not 12'-41/2"
    John Helton
    Professor of CAD
    Oklahoma City Community College
    Oklahoma City, OK

  8. #8
    Senior Member
    Using
    Inventor 2012
    Join Date
    May 2007
    Posts
    215

    Default

    yeah, that's pretty much exactly what my lisp code looks like...

    thanks for the tip RE input... will give it a shot...

  9. #9
    Senior Member
    Using
    Inventor 2012
    Join Date
    May 2007
    Posts
    215

    Default

    OH... another question.. how do i set the default template? when i click "ctrl+n" it will open a default drawing... but its not the one i want... when i click "file>new" i get the open template dialog...

    can i set a standard template so when i enter "ctrl+N" i get it?

  10. #10
    Senior Member
    Using
    Inventor 2012
    Join Date
    May 2007
    Posts
    215

    Default

    Registered forum members do not see this ad.



    okay, so had a crack at changing input dimension units, and then drew myself a line... as you can see above, my 5'-5" line is only 65mm long... both dimension scales are 1, (though not by default).

    what the hell have i done?!

Similar Threads

  1. Inches instead of feet
    By siderus in forum AutoCAD General
    Replies: 3
    Last Post: 16th May 2007, 08:46 pm
  2. Feet & Inches
    By ebjco in forum AutoCAD Drawing Management & Output
    Replies: 5
    Last Post: 6th Oct 2006, 02:36 pm
  3. Replies: 1
    Last Post: 7th Jun 2006, 07:30 pm
  4. drawing units - change from inches to feet via VBA
    By vindimy in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 18th Nov 2005, 03:58 pm
  5. inches to feet
    By giloosh in forum AutoCAD Beginners' Area
    Replies: 5
    Last Post: 13th Sep 2005, 10:49 pm

Bookmarks

Posting Permissions

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