Jump to content
metaldan

create block with N last entity

Recommended Posts

metaldan

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.

Share this post


Link to post
Share on other sites
pBe

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

 

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

Share this post


Link to post
Share on other sites
metaldan

thanks pBe

 

 

all works fine with your help

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×