How to add coordinate entry into a lisp routine and bypass user input?

How to add coordinate entry into a lisp routine and bypass user input?

matthew_neesley
Collaborator Collaborator
1,011 Views
5 Replies
Message 1 of 6

How to add coordinate entry into a lisp routine and bypass user input?

matthew_neesley
Collaborator
Collaborator

Hello to all:

 

I have been trying to implement this for a few days, thanks very much to the programmer Lee_Mac:

 

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-dynamic-block-with-visibility...

 

The code I'm using to actually invoke the insert-a-block functionality is in a separate file, just one line:

(LM:insertwithstate "V1-R3_SI_15BF_24Z_RSL_AUTO" "S0101-NA024215L - 48 length - 24 zones)

 

The one thing I want to change from the above code is: I get a prompt for where to insert the block.  How can I modify/add to the one line of code above to "hard-code" the automatic entry of values (let's say 0,0,0 for this example) every time, so I don't get any prompts?  Thanks for any responses!

 

And again...many thanks to Lee_Mac for his extensive coding efforts!

 

 

 

 

0 Likes
Accepted solutions (1)
1,012 Views
5 Replies
Replies (5)
Message 2 of 6

Kent1Cooper
Consultant
Consultant

It looks like the routine is already made to put it at 0,0,0.  Might you be getting some unexpected things happening because [as it appears in a quick glance -- no detailed evaluation] you're missing a closing double-quote on the Visibility State name?

Kent Cooper, AIA
0 Likes
Message 3 of 6

matthew_neesley
Collaborator
Collaborator

Interesting...actually, if that's indeed the case, I'd still like to be able to hard-code each individual instance.

 

I tried this:

 

(LM:insertwithstate "V1-R3_SI_15BF_24Z_RSL_AUTO" "S0101-NA024215L - 48 length - 24 zones")
(LM:insertwithstate "V1-R3_SI_15BF_24Z_RSL_AUTO" "S0101-NA024415R - 96 length - 24 zones")

 

...and it does put in both blocks correctly, but it asks for manual placement every time for each block

 

What I'm trying to do here is automatically place about 580 Visibility States spread across about 35 blocks.  Crazy I know, but I NEED to do this constantly.

 

If it was set up to indeed place at 0,0,0, then I'd literally need almost 600 different LISPS to place all the blocks automatically.  Make sense?

0 Likes
Message 4 of 6

cadffm
Consultant
Consultant

For none programmers

 

In the vl-cmdf "insert" expression,

"0,0,0" instead "\\"

?

 

 

Sebastian

Message 5 of 6

matthew_neesley
Collaborator
Collaborator

Sorry I don't understand that last reply... ?

0 Likes
Message 6 of 6

Sea-Haven
Mentor
Mentor
Accepted solution

(vl-cmdf "_.-insert" blk "_S" 1.0 "_R" 0.0 "\\")