interesting civil problem

Discussion in 'AutoCAD' started by mkh, Jul 9, 2004.

  1. mkh

    mkh Guest

    I have some cross sections that I need some work on. The sections are drawn
    at 1"=10' horizontal scale and 1"=5' vertical scale for a scale factor of 2.

    I need to find a lisp that will allow me to draw a line on this cross
    section a certain distance at a certain %grade but take the vertical scale
    factor in consideration.

    Anyone have something like that?

    Thanks for any help.

    Mike
     
    mkh, Jul 9, 2004
    #1
  2. mkh

    Tom Hanley Guest

    Land Desktop Vertical alignment editor
     
    Tom Hanley, Jul 9, 2004
    #2
  3. mkh

    mkh Guest

    sorry.....don't have LDD
    using plain autocad 2004

    Thanks for the reply though,

    MKH
     
    mkh, Jul 9, 2004
    #3
  4. mkh

    TCEBob Guest

    A little suite of snapangle routines:

    (defun C:SNP( / pe HVRATIO PER);; Set snapangle from percent. Note hor and vrr
    ;are globals
    (setq hor (if hor hor 1)
    vrr (if vrr vrr 1))
    (princ (strcat "\nPresent Hor & Vert Scales are: " (rtos hor) ", " (rtos vrr)))
    (setq yn (strcase(getstring "\nAccept? (Y/N) ")))
    (if (not(member yn '("Y" "")))
    (progn
    (setq ho (getreal(strcat "Hor. Scale <" (rtos hor) ">: "))
    hor (if ho ho hor))
    (setq ve (getreal(strcat "Vert. Scale <" (rtos vrr) ">: "))
    vrr (if ve ve vrr))
    )
    )
    (setq hvratio (/ hor vrr)
    (setq per(if per per 0))
    (setq pe(getreal (strcat "\nPercent grade: <" (rtos per) ">: ")))
    (setq per(if pe pe per))
    (setvar "snapang" (atan (* 0.01 hvratio per)))
    (princ))
    ;======================================================
    (defun C:SNS( / ag); SNS.LSP Set snapangle from slope (1:1 scale)
    (setq ag (getreal "Desired slope: "))
    (setvar "snapang" (atan (/ 1 ag)))
    (princ))
    ;======================================================
    (defun C:SNU(/ NEWANG OSM); Set UCS Z ANGLE BY PICK
    (setq osm (getvar "osmode"))
    (setvar "osmode" 512)
    (setq newang (getangle "\nNew UCS angle <0>: "))
    (if (= newang nil)
    (command "ucs" "")
    (command "ucs" "z" (* newang 57.29578))
    )
    (setvar "osmode" osm)
    (princ))
    ;======================================================
    (defun C:SN( / snp ); Set snapangle
    (#osset 512)
    (setvar "snapang" (cond ((getangle "\nNew snap angle <0>: "))(0)))
    (#osset -1)
    (princ))
    ;======================================================

    rs
     
    TCEBob, Jul 9, 2004
    #4
  5. mkh

    TCEBob Guest

    Oh, oh:

    (defun C:SN( / snp osm); Set snapangle
    (setq osm(getvar "osmode"))
    (setvar "snapang" (cond ((getangle "\nNew snap angle <0>: "))(0)))
    (servar "osmode" osm)
    (princ))

    rs
     
    TCEBob, Jul 9, 2004
    #5
  6. mkh

    btlsp Guest

    btlsp, Jul 10, 2004
    #6
  7. mkh

    mkh Guest

    I tried that....looks like it is calling other routines...

    Mike
     
    mkh, Jul 12, 2004
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.