ripuz Posted December 14, 2011 Share 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 Link to comment Share on other sites More sharing options...
Dadgad Posted December 14, 2011 Share 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 Link to comment Share on other sites More sharing options...
Tharwat Posted December 14, 2011 Share Posted December 14, 2011 Yes good ref Dadgad . Use function entlast to select last entity , and many examples in the above ref . Quote Link to comment Share on other sites More sharing options...
ripuz Posted December 14, 2011 Author Share 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 Link to comment Share on other sites More sharing options...
Tharwat Posted December 14, 2011 Share Posted December 14, 2011 You might mean this ... (sssetfirst nil (ssadd (entlast))) Quote Link to comment Share on other sites More sharing options...
ripuz Posted December 14, 2011 Author Share Posted December 14, 2011 You might mean this ... (sssetfirst nil (ssadd (entlast))) Exactly what i was looking for! Many thanks / Thomas Quote Link to comment Share on other sites More sharing options...
Tharwat Posted December 14, 2011 Share Posted December 14, 2011 You're welcome Thomas . Quote Link to comment Share on other sites More sharing options...
fixo Posted December 14, 2011 Share Posted December 14, 2011 Here is equivalent code (sssetfirst nil (ssget "_L")) Quote Link to comment Share on other sites More sharing options...
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.