+ Reply to Thread
Page 3 of 3 FirstFirst 1 2 3
Results 21 to 28 of 28

Thread: Wall Poche lisp

  1. #21
    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

    Registered forum members do not see this ad.

    Try this ...

    Code:
    (defun c:Test (/ *error* p1 p2 e w)
      (vl-load-com)
      ;;; Tharwat 11. July. 2012  ;;;
      (defun *error* (msg)
        (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
            (princ (strcat "\n** Error: " msg " **"))
        )
        (princ)
      )
      (if (not (tblsearch "LAYER" "A-Wall-Patt"))
        (entmake (list '(0 . "LAYER") '(100 . "AcDbSymbolTableRecord") '(100 . "AcDbLayerTableRecord")
                       '(2 . "A-Wall-Patt") '(62 . 252) '(70 . 0))
        )
      )
    
      (if (and (setq p1 (getpoint "\n Specify first point :"))
               (setq p2 (getpoint p1 "\n Next point :"))
          )
        (setq e (entmakex (list '(0 . "LWPOLYLINE")
                                '(100 . "AcDbEntity")
                                '(100 . "AcDbPolyline")
                                '(8 . "A-Wall-Patt")
                                '(90 . 2)
                                '(70 . 0)
                                (cons 10 (trans p1 1 0))
                                (cons 10 (trans p2 1 0))
                          )
                )
        )
      )
      (if (setq w (getdist "\n Specify width of Polyline :"))
          (vla-put-constantwidth (vlax-ename->vla-object e) w)
        (princ)
      )
      (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

  2. #22
    Super Moderator SLW210's Avatar
    Computer Details
    SLW210's Computer Details
    Operating System:
    Windows 7 PRO
    Computer:
    IBM Lenovo
    Motherboard:
    ACPI x86
    CPU:
    Pentium(R) Dual-Core CPU E5500 @ 2.80GHz
    RAM:
    4 GB RAM
    Graphics:
    Nvidia Quadro 600 1GB
    Primary Storage:
    300 GB
    Secondary Storage:
    650GB
    Monitor:
    ThinkVision 22"
    Discipline
    Multi-disciplinary
    SLW210's Discipline Details
    Occupation
    Design Draftsman
    Discipline
    Multi-disciplinary
    Details
    Mostly do drafting related to manufacturing. From doing site layouts with proposed updates, additions and renovations to be budgeted and submitted for bid, to updating and changing existing drawings to reflect maintenance and repair/revision work done on site.
    Using
    AutoCAD 2011
    Join Date
    May 2007
    Location
    South Florida, USA
    Posts
    9,125

    Default

    Grigs,

    Please read the CODE POSTING GUIDELINES and edit the code in your post.
    “A narrow mind and a fat head invariably come on the same person” Zig Zigler



  3. #23
    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

    Tharwat

    I really appreciate all the help you've given me. One last thing. 'w' defines the width of the polyline. What if I wanted the width to be 0.5 inches less than the picked width? How would that code be implemented.

  4. #24
    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

    Nevermind, I got it.

  5. #25
    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

    Tharwat, the lisp routine works well. I just have 1 question. Is it possible to alter the lisp to that you can pick multiple points? For instance, if you had a corner situation. The lisp would let you keep picking points then you would pick the 2 points that define the width and the entire polyline would be that width.

  6. #26
    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
    Tharwat, the lisp routine works well. I just have 1 question. Is it possible to alter the lisp to that you can pick multiple points? For instance, if you had a corner situation. The lisp would let you keep picking points then you would pick the 2 points that define the width and the entire polyline would be that width.
    Is this what you mean ..... ?

    Code:
    (defun c:Test (/ *error* e w)
      (vl-load-com)
    ;;; Tharwat 11. July. 2012  ;;;
      (defun *error* (msg)
        (or    (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
        (princ (strcat "\n** Error: " msg " **"))
        )
        (princ)
      )(setq e nil)
      (if (not (tblsearch "LAYER" "A-Wall-Patt"))
        (entmake (list '(0 . "LAYER") '(100 . "AcDbSymbolTableRecord" ) '(100 . "AcDbLayerTableRecord" )
               '(2 . "A-Wall-Patt") '(62 . 252)
               '(70 . 0))
        )
      )
      (command "_.pline")
      (while (eq (getvar 'cmdactive) 1) (command pause))
      (if (setq w (getdist "\n Specify width of Polyline :"))
        (progn (vla-put-layer
             (setq e (vlax-ename->vla-object (entlast)))
             "A-Wall-Patt"
           )
           (vla-put-constantwidth e w)
        )
        (princ)
      )
      (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

  7. #27
    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

    Once again you came thru for me. Works perfectly. Thanks!!!

  8. #28
    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

    Registered forum members do not see this ad.

    Quote Originally Posted by Grigs View Post
    Once again you came thru for me. Works perfectly. Thanks!!!
    You're welcome any time .
    - 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

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