+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Full Member
    Using
    AutoCAD 2004
    Join Date
    Feb 2008
    Posts
    44

    Default create block with N last entity

    Registered forum members do not see this ad.

    Hi

    I'm starting making lisp program.


    I have to make a LISP to draw N line and put it in a block at the same place off my original line.

    I know how to make line in a LOOP, but not how to select the N last entity and make a COPYBASE, ERASE "Previous", PASTE AS A BLOCK " previous"

    Someone can help with that.


    Excuse my english, i'm a french boy.

  2. #2
    Forum Deity pBe's Avatar
    Computer Details
    pBe's Computer Details
    Operating System:
    Windows 8.1
    Discipline
    Landscape
    Using
    AutoCAD 2015
    Join Date
    Apr 2010
    Posts
    3,022

    Default

    for every loop you can "capture" the last entity by using (entlast) function

    Code:
    (seqt asdf (ssadd))
    (while doing your thing. 
                 for every line entity created (ssadd (entlast) asdf))
    );end of while

  3. #3
    Full Member
    Using
    AutoCAD 2004
    Join Date
    Feb 2008
    Posts
    44

    Default

    Registered forum members do not see this ad.

    thanks pBe


    all works fine with your help

Similar Threads

  1. How to create boundary box with spline entity?
    By kwwong6 in forum AutoLISP, Visual LISP & DCL
    Replies: 51
    Last Post: 10th Mar 2015, 10:32 am
  2. Replace entity in block
    By NirantarVidyarthee in forum AutoCAD General
    Replies: 3
    Last Post: 21st Jul 2011, 02:21 pm
  3. Examining an Entity in a Block
    By Olhado_ in forum AutoLISP, Visual LISP & DCL
    Replies: 17
    Last Post: 11th Feb 2009, 03:58 pm

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