See the top rated post in this thread. Click here

Page 5 of 6 FirstFirst 123456 LastLast
Results 41 to 50 of 60

Thread: Surveying Bearing/Distance LISP Routine

  1. #41
    Active Member
    Join Date
    2002-01
    Location
    Richmond, CA Lifer
    Posts
    72
    Login to Give a bone
    0

    Default Re: Surveying Bearing/Distance LISP Routine

    THIS IS NOT MINE BUT BEEN USING IT FOR YEARS ...

    Code:
    ;Output the bearing of a line.
    (defun c:bearing ()
     (setvar "cmdecho" 0)
     (setq p1 (getpoint "Select line: "))
     (setq p2 (osnap p1 "midp"))
     (setq p3 (osnap p1 "endp"))
     (setq string (angtos (angle p2 p3)))
     (command "text" "c" (polar p2 (+ (angle p2 p3) (/ pi 2))
       (/ (getvar "textsize") 2.0)) ""  (* (/ 180.0 pi) (angle p2 p3)) string)
     (princ)
    )
    LET ME KNOW IF IT WORKS ... AL
    Last edited by rkmcswain; 2015-08-13 at 03:26 AM. Reason: Added [CODE] tags

  2. #42
    Member
    Join Date
    2017-03
    Posts
    7
    Login to Give a bone
    0

    Default Re: Surveying Bearing/Distance LISP Routine

    Hello. Our company just switch to civil 3d 2017. I was looking for a lisp routine to label bearing and distances on multiple lines at a time. Instead of having to pick on each line. Any help would be greatly appreciated.

    Thank you.

  3. #43
    I could stop if I wanted to
    Join Date
    2015-10
    Location
    Central New Jersey
    Posts
    439
    Login to Give a bone
    0

    Default Re: Surveying Bearing/Distance LISP Routine

    Civil 3d can do this.

    Select Annotate from the top menus to get to the annotate ribbon. On the left end of the ribbon is "Add Labels". This is a two part button, a top and bottom. Press the top to open the Add Label dialog. The feature you want is Line and Curve, label type is Multiple Segment. Select/make a label style for lines and one for curves. Select the objects you want labeled. The line/curve labels act just like parcel segment labels.

  4. #44
    Member
    Join Date
    2017-03
    Posts
    7
    Login to Give a bone
    0

    Default Re: Surveying Bearing/Distance LISP Routine

    When doing a subdivision layout even picking multiple segments. I still have to pick on each lot line. I was wanting to be able to isolate the layer and label all with a bearing an distance at once. Is it a setting that is keeping me from being able to this?

  5. #45
    I could stop if I wanted to
    Join Date
    2015-10
    Location
    Central New Jersey
    Posts
    439
    Login to Give a bone
    0

    Default Re: Surveying Bearing/Distance LISP Routine

    Ok, yea, Multiple would make you pick each one. It works best on a polyline with multiple segments as it would then label the entire line. if it were me, with Civil 3d, I would do it as parcel segments. (Create parcels from objects).

    I'm sure the lispers have a solution.

  6. #46
    Active Member
    Join Date
    2009-03
    Posts
    63
    Login to Give a bone
    1

    Default Re: Surveying Bearing/Distance LISP Routine

    This is super ineligant, just for my personal use, and only works with lines and polylines but might be a good starting point to do what I think you're asking for.

    Code:
    (PRINC "\n LAL: Label All Lines")
    (DEFUN C:lal ( / LAY SS:LINES CNT EN EN1 PT A)
    (VL-LOAD-COM)
    (SETQ SS:LINES (SSGET))
    (SETQ CNT 0)
    (command "-layer" "OFF" "*" "Y" "")
    (command "-layer" "ON" "0" "")
    (REPEAT (SSLENGTH SS:LINES)
    (SETQ EN (SSNAME SS:LINES CNT))
    (SETQ EN1 (VLAX-ENAME->VLA-OBJECT EN))
    (SETQ LAY (VLAX-GET EN1 'LAYER))
    (VLAX-PUT EN1 'LAYER "0")
    (COND
      ((= (CDR (ASSOC 0 (ENTGET EN))) "LINE")
       (SETQ PT (LIST (/ (+ (CAR (VLAX-GET EN1 'StartPoint)) (CAR (VLAX-GET EN1 'EndPoint))) 2) (/ (+ (CADR (VLAX-GET EN1 'StartPoint)) (CADR (VLAX-GET EN1 'EndPoint))) 2))))
      ((= (CDR (ASSOC 0 (ENTGET EN))) "LWPOLYLINE")
       (SETQ PT (LIST (/ (+ (NTH 0 (VLAX-GET EN1 'Coordinates)) (NTH 2 (VLAX-GET EN1 'Coordinates))) 2) (/ (+ (NTH 1 (VLAX-GET EN1 'Coordinates)) (NTH 3 (VLAX-GET EN1 'Coordinates))) 2))))
      )
    (IF PT
      (COMMAND "ADDSEGMENTLABELS" "NEA" PT ""))
    (VLAX-PUT EN1 'LAYER LAY)
    (SETQ PT NIL)
    (SETQ CNT (+ 1 CNT))
    )
    (command "-layer" "ON" "*" "")
    (command "REGEN")
    (PRINC)
    )

  7. #47
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Surveying Bearing/Distance LISP Routine

    Quote Originally Posted by ccalder View Post
    This is super ineligant, just for my personal use, and only works with lines and polylines but might be a good starting point to do what I think you're asking for.
    Very nice @ccalder !
    R.K. McSwain | CAD Panacea |

  8. #48
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Surveying Bearing/Distance LISP Routine

    Quote Originally Posted by ccalder View Post
    This is super ineligant, just for my personal use, and only works with lines and polylines but might be a good starting point to do what I think you're asking for.
    Nice, it does do arcs on lwpolylines. Shouldn't be hard to add something for arcs.

  9. #49
    Member
    Join Date
    2017-03
    Posts
    7
    Login to Give a bone
    0

    Default Re: Surveying Bearing/Distance LISP Routine

    Ccalder.

    I ran the lisp routine could not get it to work. Do you have to have the layer frozen to start the command?

  10. #50
    I could stop if I wanted to
    Join Date
    2014-08
    Posts
    448
    Login to Give a bone
    0

    Default Re: Surveying Bearing/Distance LISP Routine

    In Civil3d in the line/curve label dialog there is an option to label multiple segments. It will label all segments of a pline

Page 5 of 6 FirstFirst 123456 LastLast

Similar Threads

  1. Distance Lisp Routine Help
    By BCrouse in forum AutoLISP
    Replies: 53
    Last Post: 2018-03-21, 02:40 PM
  2. Annotate bearing/distance
    By justinxxvii in forum AutoCAD General
    Replies: 8
    Last Post: 2009-06-02, 09:35 AM
  3. Northing & Easting Miss Surveying Lisp routine
    By amazingb2003 in forum AutoLISP
    Replies: 6
    Last Post: 2008-04-23, 06:45 PM
  4. bearing and distance lables
    By eleonard in forum AutoCAD Civil 3D - General
    Replies: 1
    Last Post: 2007-04-24, 08:41 PM
  5. Annotation - Bearing and Distance - Civil
    By Mlabell in forum Dynamic Blocks - Sharing
    Replies: 9
    Last Post: 2007-04-05, 11:45 AM

Posting Permissions

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