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

use and object as a selection

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
vivifira
364 Views, 4 Replies

use and object as a selection

Hi all,

 

I was wondering if there was a way to use a block inserted with lisp as a selection point. for example:

 

(command ".-insert" ablock a 1 1 "90" "") and then use this block as my selection point for an array function.

 

Right now I'm using insertion point 'a' as my selection point and I'm finding it depends on where in the drawing order my block inserts whether or not this point selects my block. I have added an isolateobject command using the same point 'a' but it is only about 85% effective in selecting my block. So I added a line command from point 'a' to point 'b' before the isolateobject command and then have that line erase before inserting my block and that upped my success rate to about 92% of the time. There has to be an easier way of doing this and making the success rate up to 100% of the time. Please help. Thanks in advance.

4 REPLIES 4
Message 2 of 5
hgasty1001
in reply to: vivifira

Hi,

 

I'm not sure to understand, do you need to select the block just inserted? if so, a call to entlast should help.

 

Gaston Nunez

Message 3 of 5
vivifira
in reply to: hgasty1001

I thought of using enlist, but I thought that only worked for points....... let me see if that works

Message 4 of 5
vivifira
in reply to: vivifira

<smacks head and says "doh" like homer simpson > yup! that worked. Thanks for the assisit. 🙂
Message 5 of 5
Kent1Cooper
in reply to: vivifira


@vivifira wrote:

.... 

(command ".-insert" ablock a 1 1 "90" "") and then use this block as my selection point for an array function.

 

Right now I'm using insertion point 'a' as my selection point and I'm finding it depends on where in the drawing order my block inserts whether or not this point selects my block. .....


I'm surprised that if you're doing this right after inserting it, it's not seeing the Block insertion, since it ought to be "on top" under the circumstances, but it would also depend on having some drawn element in the Block itself at its insertion point, to pick it by if using that point for selection.  But if you're selecting it to do something with in an editing command such as Copy or Move or Array, either (entlast) or just the Last option in object selection would find it, whether or not there's drawn content at the insertion point, e.g.

 

(command "_.copy" "_last" "" ....

Kent Cooper, AIA

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

Post to forums  

Autodesk Design & Make Report

”Boost