Grrr Posted April 29, 2016 Share Posted April 29, 2016 Hi guys, I wanted to ask this: Is there a way to perform "entsel" and "nentsel" at the same time (with one click) ? For example I'm trying to pick a nested line from a dynamic block, and I'm trying to store line's entity name block's entity name. Command: (entsel) Select object: (<Entity name: 7ff64b74d980> (58158.7 46703.2 0.0)) I've realized that (cdr (entsel)) would returns the coordinates of the user's picked point, but would it be possible to invoke nentsel and apply/simulate the same picked point? Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted April 29, 2016 Share Posted April 29, 2016 Maybe something like this - instead of nentsel - use nentselp and look for differences between those two different outputs (nentsel/nentselp) : (defun c:pick ( / es ns ) (setq es (entsel "\nPick an entity...")) (setq ns (nentselp (cadr es))) (prompt "\nEntsel data : ") (princ es) (prompt "\nNentselp data : ") (princ ns) (princ) ) Quote Link to comment Share on other sites More sharing options...
Grrr Posted April 29, 2016 Author Share Posted April 29, 2016 Thanks, Marko! I had few ideas for a routines that would include this method, and I'm happy that it was not so hard to solve. Cheers from Bulgaria! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted April 29, 2016 Share Posted April 29, 2016 There is no need for a second selection - the list of parent entities is the 4th item in the list returned by nentselp when a nested entity is selected. Quote Link to comment Share on other sites More sharing options...
Grrr Posted April 29, 2016 Author Share Posted April 29, 2016 I just tried this: Command: (nentsel) Select object: (<Entity name: 7ff6925060b0> (58211.6 46249.8 0.0) ((1.0 0.0 0.0) (0.0 1.0 0.0) (0.0 0.0 1.0) (55462.9 46380.2 0.0)) (<Entity name: 7ff692504ec0>)) As I understand (car (nentsel)) would return the nested entity's name, and (last (nentsel)) would return parent entity, therefore when I pick the same line of the block: Command: (entsel) Select object: (<Entity name: 7ff692504ec0> (58178.1 46249.8 0.0)) Command: (last (nentsel)) Select object: (<Entity name: 7ff692504ec0>) (last (nentsel)) would be equal to (car (entsel)) I hope I understood this correctly Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted April 29, 2016 Share Posted April 29, 2016 (last (nentsel)) would be equal to (car (entsel))I hope I understood this correctly Not quite: try creating a nested block with several levels of nesting and then select a component of the block - you will find that the last item in the list returned by nentsel/nentselp will contain a list of entities, one for each parent above the selected entity. In this way, (last (last (nentselp))) will be equal to (car (entsel)) Quote Link to comment Share on other sites More sharing options...
Grrr Posted April 29, 2016 Author Share Posted April 29, 2016 Lee, These little details make the difference why your codes are (always) flawless. I haven't tought about multi-nested entities. Thanks! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted April 29, 2016 Share Posted April 29, 2016 Thank you for your kind words Grrr, a complete knowledge of the functions comes with years of practice - you are well on your way. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 29, 2016 Share Posted April 29, 2016 Hi, Bookmark THIS PAGE and let it be your reference. Quote Link to comment Share on other sites More sharing options...
Grrr Posted April 29, 2016 Author Share Posted April 29, 2016 Hi Tharwat, I just figured out how to use the "offline help" in AutoCAD, since I often loose internet connection. But you've noticed again that I haven't checked it for solving this problem. Sorry about that, atleast someone could learn something from this thread Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 29, 2016 Share Posted April 29, 2016 I am still keeping AutoCAD 2009 for that purpose of Help document since help docs in CADs from 2011 til 2017 are going online and that is really sucks when you have no other choice to see the rest of function in a list on the left side hand as we have them in old versions of AutoCAD prior of 2011. Quote Link to comment Share on other sites More sharing options...
Grrr Posted April 29, 2016 Author Share Posted April 29, 2016 I am still keeping AutoCAD 2009 for that purpose of Help document since help docs in CADs from 2011 til 2017 are going online and that is really sucks when you have no other choice to see the rest of function in a list on the left side hand as we have them in old versions of AutoCAD prior of 2011. Indeed. The 2015 help I got is not that comfortable as the one you linked, still it does its purpose. It would be very nice if that html was compiled like the acadauto.chm (AutoCad ActiveX Reference). Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 29, 2016 Share Posted April 29, 2016 I have raised that issue when Autodesk has announced or posted a thread to get Developers' opinions about this matter in THIS THREAD and you can participate in the same thread if you already have account or just create one if you are interested. The fore-said thread is not that old, have a look at the starting time of writing it. Quote Link to comment Share on other sites More sharing options...
Grrr Posted April 29, 2016 Author Share Posted April 29, 2016 (edited) I have raised that issue when Autodesk has announced or posted a thread to get Developers' opinions about this matter in THIS THREAD and you can participate in the same thread if you already have account or just create one if you are interested. The fore-said thread is not that old, have a look at the starting time of writing it. I just did that, I wasn't aware that using developer doc could be that comfortable as the video you posted there. So you got kudos from me, aswell I participated in that survey. Still I think that Autodesk should consider more the opinion from a guys like you - who often helps other users. For example as I've read on the forums - there might be 100 skilled coders that help(ed) atleast 100 000 users. Edited April 29, 2016 by Grrr Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 29, 2016 Share Posted April 29, 2016 Your Kudos are highly appreciated. thank you. 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.