Jump to content

HOW TO suppress FILTER window ??


coombsie111

Recommended Posts

Hello all readers,

 

New to all this and not very knowledgable when it comes to lisp, macros etc.... but appreciate their awesome power and have managed to *******ise (please excuse the language) some from my previous company and put them to good use.

 

But thats enough prattling and lets get down to brass tacks.

 

I like to use the FILTER command to select objects, i.e bylayer, blockname , text content etc... and find them very useful. I have used the SaveAs function to collate many of the useful ones that I may need to use on future occassions.

 

My problem is that I would like to use this FILTER command in a LISP routine, but dont know how (or even if) I can suppress the window from opening. (Prefixed hyphen does not work) i.e If I wanted to erase all text with BH in it, I would want to create one fluid LISP (& button) to complete this task and not some piecemeal version.

 

At this point in time I dont have a specific LISP routine in mind, but I have some ideas that it may be of great use on.

 

Any help would be much appreciated. Thank you..

 

Kind regards Mr C

Link to comment
Share on other sites

ttray33y,

 

Thanks for your help, but I dont understand - can you ellaborate, perhaps provide an example. Is this related to FILTERS command - can I invoke one of my Saved filters by name? or a different way of achieving the same end? Please confirm..

 

PS: Apologies for novice head

Link to comment
Share on other sites

SSGET is lisp version of get objects and you can use filters, 1st part is object picking "X" means search all dwg you can use window options also WP CP W plus others F, then you can use a filter based on the dxf codes for a particular object looking for a block 0 = "INSERT" 8=layername 10=insertion point, check help it describes a number of combinations. For the dxf codes have a look at the screen after copy tiny lisp to command line and pick object (entget (car (entsel)))

 

If you wanted different type of objects in one filter you can use combinations like (8 , "layer1,layer2,layer3") (8 . "Layer*") all layers starting with "layer" or in simple method you can join selection sets together.

 

You could make a series of little defuns that are your favourite searches. in combination with what you want to do.

 

Re text with BH to be deleted. (setq ss (ssget "x" '((2 . "Text")) then you need a defun search each text and delete if it has BH in it. For delete try Lee-mac.com for "search text string.lsp".

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