+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 28

Thread: Wall Poche lisp

  1. #1
    Senior Member
    Computer Details
    Grigs's Computer Details
    Operating System:
    Win7 64bit
    Computer:
    Dell T3500
    CPU:
    Quad Core Xeon
    RAM:
    6 Gig
    Graphics:
    Nvidia FX570
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    Portland, OR
    Posts
    123

    Default Wall Poche lisp

    Registered forum members do not see this ad.

    I can see how this would work, just can't write the code. Was wondering if someone could help. Basically, you would pick 3 points. The first 2 would determine the width and the 3rd would determine the length. Then, it would create a polygon using the width and length. I know it sounds weird, but it would really help.

    Thanks

  2. #2
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    3,007

    Default

    Something like this?
    Code:
    ;;; 3 Points Polygon (11-VII-2012)
    (defun c:3PP( / point1st point2nd point3rd  )
     (while (and (setq point1st (getpoint "\nPick insertion point: "))
                 (setq point2nd (getpoint point1st "\nIndicate width: "))
                 (setq point3rd (getpoint point1st "\nIndicate length ")))
      (command "_RECTANGLE" "_non" point1st
                            "_non" (list (+ (car  point1st) (distance point1st point3rd))
                                         (+ (cadr point1st) (distance point1st point2nd))))
     )
    
     (princ)
    )
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  3. #3
    Senior Member
    Computer Details
    Grigs's Computer Details
    Operating System:
    Win7 64bit
    Computer:
    Dell T3500
    CPU:
    Quad Core Xeon
    RAM:
    6 Gig
    Graphics:
    Nvidia FX570
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    Portland, OR
    Posts
    123

    Default

    Kinda. That draws a rectangle. What I need it a polyline.

  4. #4
    Forum Deity Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draftsman
    Discipline
    Mechanical
    Using
    AutoCAD 2014
    Join Date
    Oct 2009
    Location
    Lives in Abu Dhabi
    Posts
    2,631

    Default

    Quote Originally Posted by Grigs View Post
    Kinda. That draws a rectangle. What I need it a polyline.
    Upload a drawing shows your needs in it .
    - When aim is being settled in my mind , I have to reach it and get it in hand whatever it costs and wherever it is and will never give up . Tharwat said

  5. #5
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    3,007

    Default

    Quote Originally Posted by Grigs View Post
    Kinda. That draws a rectangle. What I need it a polyline.
    A rectangle is nothing more than a polyline entity.
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  6. #6
    Senior Member
    Computer Details
    Grigs's Computer Details
    Operating System:
    Win7 64bit
    Computer:
    Dell T3500
    CPU:
    Quad Core Xeon
    RAM:
    6 Gig
    Graphics:
    Nvidia FX570
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    Portland, OR
    Posts
    123

    Default

    Does this help?


    Capture.jpg

  7. #7
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    3,007

    Default

    So you are looking in fact for a single segment polyline with width different than 0?
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  8. #8
    Senior Member
    Computer Details
    Grigs's Computer Details
    Operating System:
    Win7 64bit
    Computer:
    Dell T3500
    CPU:
    Quad Core Xeon
    RAM:
    6 Gig
    Graphics:
    Nvidia FX570
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    Portland, OR
    Posts
    123

    Default

    Correct. The width would be determined by the first 2 points that are selected.

    I know the image looks a little different than what I am explaning, but honestly all I need is the base code that creates it. I can tweak it to do what I want it to end up looking like.

  9. #9
    Forum Deity Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draftsman
    Discipline
    Mechanical
    Using
    AutoCAD 2014
    Join Date
    Oct 2009
    Location
    Lives in Abu Dhabi
    Posts
    2,631

    Default

    This ... ?

    Code:
    (defun c:Test (/ p1 p2 vl gr) (vl-load-com)
      (if (and (setq p1 (getpoint "\n Specify first point :"))
               (setq p2 (getpoint p1 "\n Next point :"))
          )
        (progn
          (vl-cmdf "_.pline" "_non" p1 "_non" p2 "")
          (setq vl (vlax-ename->vla-object (entlast)))
          (while (eq (car (setq gr (grread t 15 0))) 5)
            (redraw)
            (grdraw p1 (polar p1 (+ (angle p1 p2) (/ pi 2.)) (distance p1 (cadr gr))) 1 0)
            (vla-put-constantwidth vl (distance p1 (cadr gr)))
          )
        )
        (princ)
      )
      (redraw)
      (princ)
    )
    - When aim is being settled in my mind , I have to reach it and get it in hand whatever it costs and wherever it is and will never give up . Tharwat said

  10. #10
    Senior Member
    Computer Details
    Grigs's Computer Details
    Operating System:
    Win7 64bit
    Computer:
    Dell T3500
    CPU:
    Quad Core Xeon
    RAM:
    6 Gig
    Graphics:
    Nvidia FX570
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    Portland, OR
    Posts
    123

    Default

    Registered forum members do not see this ad.

    That's an interesting way to go about it. It seems that the 2 points define the length, then it has a rubberband effect that does the width. If there was a way to type in a width or pick 2 points for the width, it would be great.

Similar Threads

  1. Plan showing wall thickness need section- anybody give lisp
    By mmsmurugan1 in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 3rd May 2012, 12:20 pm
  2. curtain wall tie to cavity wall
    By lorrayneprunty in forum Revit General
    Replies: 1
    Last Post: 23rd Mar 2010, 04:36 pm
  3. Wall LISP Request.
    By TheNewGuy in forum AutoLISP, Visual LISP & DCL
    Replies: 14
    Last Post: 9th Jun 2009, 05:23 am
  4. Replies: 10
    Last Post: 24th Aug 2007, 05:34 pm
  5. Lisp for dimensioning to the centre of a wall?
    By victoreric in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 21st Feb 2005, 02:08 am

Bookmarks

Posting Permissions

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