ripuz Posted December 14, 2011 Posted December 14, 2011 Hello everyone! I want to select a block that i just inserted. This works fine: [list=1] [*]write "select" on the command line and hit enter [*]write "L" and hit enter [*]hit enter to end the command [/list] The block is now selected. I thought that this would work exactly the same way: (command "select" "L" "") The block is not selected... Why? And how can i select my block from autolisp? Quote
Dadgad Posted December 14, 2011 Posted December 14, 2011 You might want to read this. http://www.cadtutor.net/forum/showthread.php?59216-select-last-quot-n-quot-entities-drawn-inside-a-lisp Quote
Tharwat Posted December 14, 2011 Posted December 14, 2011 Yes good ref Dadgad . Use function entlast to select last entity , and many examples in the above ref . Quote
ripuz Posted December 14, 2011 Author Posted December 14, 2011 I know i can get my hands on the entity with entlast but how can i select it? By "select it" i mean as if i just click on it without any active command. I want it to look like this image: Quote
Tharwat Posted December 14, 2011 Posted December 14, 2011 You might mean this ... (sssetfirst nil (ssadd (entlast))) Quote
ripuz Posted December 14, 2011 Author Posted December 14, 2011 You might mean this ... (sssetfirst nil (ssadd (entlast))) Exactly what i was looking for! Many thanks / Thomas Quote
fixo Posted December 14, 2011 Posted December 14, 2011 Here is equivalent code (sssetfirst nil (ssget "_L")) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.