Results 1 to 4 of 4

Thread: Traverse Routine

  1. #1
    Member
    Join Date
    2017-09
    Posts
    2
    Login to Give a bone
    0

    Default Traverse Routine

    Hi all,

    I've been searching for a traverse tool that allows the user to select an endpoint of a line, choose another point along the same line as a backsite, then have the user enter an angle and distance and have a line drawn at the given distance and angle from the original referenced line. I've found many bearing and distance traverse tools but no luck finding one as described. Please advise if my description isn't clear enough.

    Thanks,

  2. #2
    I could stop if I wanted to
    Join Date
    2002-08
    Posts
    231
    Login to Give a bone
    0

    Default Re: Traverse Routine

    Hi,

    Try this! Can be a starting for you.
    Code:
    (defun c:relative_angle ( / js oldsnap oldortho dxf_ent alpha ang_supp)
    	(princ "\nSelection of reference line.")
    	(setq js (ssget "_+.:E:S" '((0 . "LINE"))))
    	(cond
    		(js
    			(setq
    				oldsnap (getvar "snapang")
    				oldortho (getvar "orthomode")
    				dxf_ent (entget (ssname js 0))
    				alpha (angle (trans (cdr (assoc 10 dxf_ent)) 0 1) (trans (cdr (assoc 11 dxf_ent)) 0 1))
    			)
    			(initget 1)
    			(setq ang_supp (getangle "\nAngle to add: "))
    			(setvar "snapang" (+ alpha ang_supp))
    			(setvar "orthomode" 1)
    			(command "_.line" pause "_none" pause "")
    			(setvar "orthomode" oldortho)
    			(setvar "snapang" oldsnap)
    			(command "_.line" "")
    		)
    	)
    	(princ)
    )

  3. #3
    Member
    Join Date
    2017-09
    Posts
    2
    Login to Give a bone
    0

    Default Re: Traverse Routine

    Thanks, I'll give it a try. I have a feeling I'm going to be in over my head with this one though, thanks for the help nonetheless!

  4. #4
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    559
    Login to Give a bone
    0

    Default Re: Traverse Routine

    Be careful of using assoc 10 & 11 these are hard set by the direction the line was drawn so angle could be 180 out. A suggestion is pick line point near end then compare the ends to this point and possibly swap the angle direction, also much easier than having to pick two points.

    Code:
    (setq d1 (distance pt1 pt3))
      (setq d2 (distance pt2 pt3))
        (if (> d1 d2)
          (progn 
            (setq temp pt1)
            (setq pt1 pt2)
            (setq pt2 temp)
          )
        )
      (setq ang (angle pt1 pt2)) ; this is the angle towards the pick point

Similar Threads

  1. 2007: Traverse Adjustment
    By mike834103 in forum AutoCAD Civil 3D - Survey
    Replies: 2
    Last Post: 2016-01-13, 11:16 AM
  2. Balancing a traverse with Least Squares
    By JEzzell in forum AutoCAD Civil 3D - Survey
    Replies: 4
    Last Post: 2016-01-13, 11:09 AM
  3. Traverse adjustment
    By Wish List System in forum Civil 3D Wish List
    Replies: 0
    Last Post: 2014-11-21, 01:49 AM
  4. Traverse balance
    By Wish List System in forum Civil 3D Wish List
    Replies: 0
    Last Post: 2013-10-28, 11:37 PM
  5. Traverse from FBK file
    By beamerr15 in forum AutoCAD Civil 3D - Survey
    Replies: 1
    Last Post: 2010-03-09, 09:01 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
  •