Jump to content

Entsel and Nentsel at the same time


Grrr

Recommended Posts

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?

Link to comment
Share on other sites

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)
)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

(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))

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Grrr
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...