Results 1 to 8 of 8

Thread: site plan input feet instead of inches

  1. #1
    Member
    Join Date
    2007-11
    Posts
    6
    Login to Give a bone
    0

    Default site plan input feet instead of inches

    I've been using this code below to draw site plan, but when ask for distance it only allow you to input inches and not feet, is there anyway someone can help me convert this so that we can input 112.21' instead inches.
    thanks,

    Code:
    ;Tip1741:  BD.LSP           Bearing/Distance lines         (c)2001, Joon Hong  $50 Bonus Winner
    
    (defun C:BD  ()
      (setvar "cmdecho" 0)
      (initget 1)
      (setq PT (getpoint "\nPick a starting point: "))
      (initget 1 "NE NW SE SW")
      (setq BR (getkword "\nPick bearing (NE/NW/SE/SW): "))
      (setq OPT (strcase BR))
      (initget 1)
      (setq LEN (getreal "\nType the length: "))
      (setq DEG (getstring "\nType the degree: ")
            minx (getstring "\nType the minute: ")
            SEC (getstring "\nType the second: "))
      (if (= DEG "")
        (setq DEG "0"))
      (if (= minx "")
        (setq minx "0"))
      (if (= SEC "")
        (setq SEC "0"))
      (cond ((= "SW" OPT)
             (setvar "angbase" (cvunit 270 "degree" "radian"))
             (setvar "angdir" 1))
            ((= "SE" OPT)
             (setvar "angbase" (cvunit 270 "degree" "radian"))
             (setvar "angdir" 0))
            ((= "NW" OPT)
             (setvar "angbase" (cvunit 90 "degree" "radian"))
             (setvar "angdir" 0))
            ((= "NE" OPT)
             (setvar "angbase" (cvunit 90 "degree" "radian"))
             (setvar "angdir" 1)))
      (command "line" PT (strcat "@" (rtos LEN) "<" DEG "d" minx "'" SEC "\"") "")
      (setvar "angbase" 0)
      (setvar "angdir" 0)
      (setvar "cmdecho" 1)
      (princ))
    (princ "\nType 'BD' to draw lines with bearings")
    (princ)

  2. #2
    Certifiable AUGI Addict tedg's Avatar
    Join Date
    2005-06
    Location
    in the upper right corner
    Posts
    3,508
    Login to Give a bone
    0

    Default Re: site plan input feet instead of inches

    This routine is assuming you are in decimal units where one unit = 1 foot.
    AFIK...that is typically how civil drafting is done in AutoCAD (in the United States/Imperial Units).

    It doesn't want feet or inch marks, just "foot units".

    If you set up your drawing/template for decimal units where one unit is 1 foot, you should be all set.

  3. #3
    Certified AUGI Addict cadtag's Avatar
    Join Date
    2000-12
    Location
    Cairo - no, not Illinois
    Posts
    5,069
    Login to Give a bone
    0

    Default Re: site plan input feet instead of inches

    It seems that it would be simpler to just set angular units to surveyor's units, and just input the distance and bearing directly.

  4. #4
    Member
    Join Date
    2007-11
    Posts
    6
    Login to Give a bone
    0

    Default Re: site plan input feet instead of inches

    I did try to change the unit to decimal but it doesn't seem to work, plus I am also drawing this on the same drawing as the architecture plan set, so i don't want to keep switch the unit to decimal to draw the site and switch back. I was hoping someone can help me with this. Thank you both for the fast response.

  5. #5
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: site plan input feet instead of inches

    Code:
    (setq LEN (getreal "\nType the length: "))
    I would recommend you change the getreal in this line to a getdist. This would allow you to input the length by keyboard or mouse clicks.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  6. #6
    Member
    Join Date
    2007-11
    Posts
    6
    Login to Give a bone
    0

    Default Re: site plan input feet instead of inches

    I try that but still doesn't allow me to input 112.15'. I get this error "Requires numeric distance or two points." I even comment out the (initget 1) and it still doesn't work.

  7. #7
    Member
    Join Date
    2007-11
    Posts
    6
    Login to Give a bone
    0

    Default Re: site plan input feet instead of inches

    Opie, Thank you very much, i got everything to work now, the problem i have earlier is my unit set to decimal so it wouldn't let me punch in the feet tick mark.

  8. #8
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: site plan input feet instead of inches

    Quote Originally Posted by james281 View Post
    Opie, Thank you very much, i got everything to work now, the problem i have earlier is my unit set to decimal so it wouldn't let me punch in the feet tick mark.
    That would be correct. The getdist function accomplishes that.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

Similar Threads

  1. inches instead of feet and inches
    By Wagurto in forum Revit Architecture - General
    Replies: 3
    Last Post: 2013-04-11, 06:02 AM
  2. Faster feet/inches input
    By Scott Hopkins in forum Revit Architecture - Tips & Tricks
    Replies: 15
    Last Post: 2013-02-01, 12:54 AM
  3. 2011: feet-inches-sixteenths input and dimensioning
    By basement_boat in forum AutoCAD General
    Replies: 4
    Last Post: 2011-06-09, 07:17 PM
  4. Feet vs Inches
    By CADMama in forum Revit Architecture - General
    Replies: 23
    Last Post: 2006-02-01, 04:30 PM
  5. Replies: 3
    Last Post: 2004-08-04, 05:10 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
  •