Results 1 to 4 of 4

Thread: Routine to plce 5ft line segment perpedicular and at end point

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2019-02
    Posts
    1
    Login to Give a bone
    0

    Default Routine to plce 5ft line segment perpedicular and at end point

    Does anyone know of a way to place a 5 ft line segment that would be perpendicular to selected lines in a drawing. Like a T. I need to have each line segment end with a T intersection or a left or right 90 at the end.

  2. #2
    Member
    Join Date
    2010-10
    Location
    Việt Nam
    Posts
    45
    Login to Give a bone
    0

    Default Re: Routine to plce 5ft line segment perpedicular and at end point

    I think you should try to post 1,2 drawing / image to describe your idea

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

    Default Re: Routine to plce 5ft line segment perpedicular and at end point

    Going back a step rather than adding should it be when drawing the original line in the 1st place ? The method is pretty easy as an add last pick line get angle add 90 then L R Mid ?

    ScreenShot016.jpg

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

    Default Re: Routine to plce 5ft line segment perpedicular and at end point

    Found some time have a look at this, the two multi lisps are library routines rather tahn command line input use dynamic dcl's.

    Code:
    ; perp line on end of a line
    ; By Alan H March 2019
    
    (defun lperp ( / dist pt1 pt2 ans ang oldsnap)
    ;(setq dist 5); remove line to use input
    (if (not AH:getvalsm)(load "Multi Getvals.lsp"))
    (setq dist (atof (nth 0 (AH:getvalsm (list "Length input" "Enter length" 10 9 "5")))))
    (setq oldsnap (getvar 'osmode))
    (setq pt1 (getpoint "pick pt1"))
    (setq pt2 (getpoint pt1 "pick pt2"))
    (setq ang (+ (/ pi 2.0)(angle pt1 pt2)))
    (setvar 'osmode 0)
    (command "line" pt1 pt2 "")
    (if (not AH:Butts)(load "Multi radio buttons.lsp"))
    (setq ans (ah:butts "V"   '("Please choose" "Left" "Mid" "Right" )))
    (cond 
    ((= ans "Left")(command "line" pt2 (polar pt2 ang dist) ""))
    ((= ans "Right")(command "line" pt2 (polar pt2 (+ pi ang) dist) ""))
    )
    (if (= ans "Mid")(progn
    		(setq pt1 (polar pt2 ang (/ dist 2.0)))
    		(setq pt2 (polar pt1 (+ pi ang) dist))
    		(command "line" pt1 pt2 "")
    		)
    )
    (setvar 'osmode oldsnap)
    )
    (lperp)
    Attached Files Attached Files

Similar Threads

  1. 2010: making all line segmentsof same line type show as one line segment
    By Darren Allen in forum AutoCAD LT - General
    Replies: 5
    Last Post: 2015-09-02, 10:35 PM
  2. Polyline Segment LSP Routine Help
    By ann.wozniak in forum AutoLISP
    Replies: 10
    Last Post: 2012-11-25, 09:51 AM
  3. Help with a lisp routine to add a 12" line to this routine
    By Orbytal.edge341183 in forum AutoLISP
    Replies: 3
    Last Post: 2012-11-14, 10:33 PM
  4. Replies: 10
    Last Post: 2007-03-23, 01:50 AM
  5. Dimensioning non perpedicular walls
    By david.metcalf in forum Revit Architecture - General
    Replies: 6
    Last Post: 2005-06-07, 11:42 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
  •