Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

make block between start / end commands

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
E.S.7.9
327 Views, 4 Replies

make block between start / end commands

hi ,

 

i need a lisp which is going to make a block all of entities between start / end commands , it is almost similar with undo / begin and undo / end ... can any body share with me  similar lisp code ?

 

thank you

4 REPLIES 4
Message 2 of 5
Kent1Cooper
in reply to: E.S.7.9

Assuming you mean to issue some kind of Start-Block command, and want all newly-drawn entities after it to be included in a Block that will be defined after you issue some kind of End-Block command, the attached BlockStartEnd.lsp, with its SB and EB commands, seems to work.  It leaves you in the Block dialog box, to designate the Block name, insertion point, and whatever other options.

Kent Cooper, AIA
Message 3 of 5
E.S.7.9
in reply to: Kent1Cooper

thank you Kent , that one is what exactly i want to do , just it`s sometimes working well but sometimes giving an error (; error: bad argument type: lentityp nil) ,

 

but anyway this lisp is my solution ... thank you again

Message 4 of 5
Kent1Cooper
in reply to: E.S.7.9


@E.S.7.9 wrote:

thank you Kent , that one is what exactly i want to do , just it`s sometimes working well but sometimes giving an error (; error: bad argument type: lentityp nil) ,

 

but anyway this lisp is my solution ... thank you again


I expect that error would be if you started with SB first thing in a drawing, because its setting of the sbbase variable with (entlast) would return nil.  The attached upgraded version accounts for that possibility, and also prevents the User from using EB without having first used SB.

Kent Cooper, AIA
Message 5 of 5
E.S.7.9
in reply to: Kent1Cooper

it ` s working perfectly , thank you again Kent

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost