Results 1 to 5 of 5

Thread: Offset Contours...

  1. #1
    Member
    Join Date
    2012-01
    Posts
    5
    Login to Give a bone
    0

    Default Offset Contours...

    Hello...

    I'm not a LISP expert by any means, but I was able to write this:

    (defun c:3 ()
    (IF (= SLOPE NIL) (SETQ SLOPE 4))
    (IF (= INTER NIL) (SETQ INTER 2))


    (SETQ SLP (GETREAL (STRCAT "\nEnter Slope <" (RTOS SLOPE) ">: ")))
    (IF (= SLP NIL) (SETQ SLP SLOPE))
    (SETQ SLOPE SLP)


    (SETQ INT (GETREAL (STRCAT "\nEnter Contour Ratio <" (RTOS INTER) ">: ")))
    (IF (= INT NIL) (SETQ INT INTER))
    (SETQ INTER INT)


    (SETQ OFF (ABS (* SLP INT)))
    (SETQ DIFF INT)


    (SETQ CON (ENTSEL "\nSelect Contour: "))
    (REDRAW (CAR CON) 3)


    (WHILE (NOT (NULL (SETQ SIDE (GETPOINT "\nPick Offset Side: "))))
    (COMMAND "OFFSET" OFF CON SIDE "")
    (SETQ LCON (entlast))
    (SETQ CON LCON)
    (COMMAND "MOVE" CON "" (LIST 0.0 0.0 DIFF) "")
    (SETQ CON_ENT (ENTGET CON))
    (SETQ CON_ELEV (CDR (ASSOC '38 CON_ENT)))
    (PRINC "\n Last Contour Elevation: ")(PRINC CON_ELEV)(PRINC)
    )
    )

    Can someone help me write something similar so except having it prompt the user for slope and ending elevation and having it offset until it gets to the inputted elevation? For example, starting w/ a 100 contour, prompting user for a slope, say 2 to 1, then prompting user for an elevation, say 120, the routine would the offset contours to get to 120.

    Hope that makes sense. Thanks in advance !

  2. #2
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: Offset Contours...

    Hi .

    I think it's easy to do , but first we need to understand the aim of the code , so can you upload a sample drawing or a snapshot showing before and after ?

    Does the offset side is the Z axis ?

    Tharwat

  3. #3
    Member
    Join Date
    2012-01
    Posts
    5
    Login to Give a bone
    0

    Default Re: Offset Contours...

    here's the scenario...
    Lets say I have a contour that is at elevation 100 and I want to draw contours at a 2:1 slope to elevation 200. I want the routine to prompt me the slope and final elevation and have it offset the original contour 4' to elevation 102, then another 4' to elevation 104, etc etc...until it hits elevation 200.

  4. #4
    Member
    Join Date
    2012-01
    Posts
    5
    Login to Give a bone
    0

    Default Re: Offset Contours...

    never mind...i got it!!

    woooooo!

    Thanks though Tharwat

  5. #5
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: Offset Contours...

    Quote Originally Posted by inh.ling597155 View Post
    never mind...i got it!!

    woooooo!

    Thanks though Tharwat
    Good for you .

    Can you post your code ? So that would give me the chance to know what you are after besides that we may could propose alternative .

    Thanks

Similar Threads

  1. 2011: label points at an offset from alignment showing stat, offset, and description
    By mw156 in forum AutoCAD Civil 3D - Survey
    Replies: 6
    Last Post: 2016-09-29, 06:10 PM
  2. 2015: Unable to offset a spline the has already been offset.
    By crullier in forum Inventor - General
    Replies: 1
    Last Post: 2014-12-19, 07:39 AM
  3. Pipe Filter by level offset - Reference Level Offset
    By Wish List System in forum Revit MEP - Wish List
    Replies: 0
    Last Post: 2013-04-02, 04:05 AM
  4. Replies: 0
    Last Post: 2011-10-11, 08:38 AM
  5. Contours
    By chrisr in forum ACA General
    Replies: 10
    Last Post: 2005-02-12, 10:04 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
  •