Jump to content

Recommended Posts

Posted

Hi.

 

Ncopy command is single selection type. How can I force it to get multiple entities as ssget for example ...?

 

Thanks

 

Tharwat

Posted

ssget does not work well with nested selection - the closest is something like:

 

(ssget "_:N")

 

Then use ssnamex to retrieve the selected nested entities, but this is also quite troublesome.

Posted

Hello

 

Yes you're right actually it is quite troublesome.

 

I tried the following codes .

(setq sset(ssget "_:N"))
(ssnamex sset o)
(command "_.ncopy" sset "" pause )

 

so I tried to reuse the command normally But that has caused the purge Message Box to appear after each selection set of of it !!!!!!!!

 

So what has changed to the command since there were no odd actions had taken ???... as you can see.....

 

Faithful

 

Tharwat

Posted

Your call to ssnamex is completely redundant, ssget "_:N" adds the parent entities to the SelectionSet, and the SubEntities can be found in the information returned by ssnamex.

 

To get at these entities, perhaps use something like this:

 

(vl-remove-if 'listp (mapcar 'cadr (ssnamex <SelSet>)))

Posted

It doesn't except the selection set that ... !!!

 

But the question is ........

 

Why the PURGE msg box appear after calling NCOPY normally after each pick selection ?

 

That was not before implementing the codes from the first time ....!!

 

Best Regards

 

Tharwat

Posted
ssget does not work well with nested selection - the closest is something like:

 

(ssget "_:N")

 

Then use ssnamex to retrieve the selected nested entities, but this is also quite troublesome.

 

If I want to ssget "x" and ssget "_:n" together ? would that kind of selection even work?

What I'm trying to do is select all of (2 . "blockname) even nested blockname and replace. I wrote the code to replace but wanted to know if the this selection will even work

Posted

You cannot combine anything with "_X", - this mode doesn't look at the drawing entities themselves, but rather just scans the drawing database.

 

To get at nested blocks you would need to look through the block definitions in the drawing for the required block and then modify the block definitions accordingly.

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