AutoCAD 2013/2014/2015

AutoCAD 2013/2014/2015

Reply
Contributor
vikasranga2
Posts: 18
Registered: ‎06-13-2012
Message 1 of 8 (528 Views)
Accepted Solution

Script (Commands) to make filter?

528 Views, 7 Replies
06-14-2012 03:37 AM

Anyone knows script (command) to make filter and then select any filter.

 

I have to run this operation on several files. So, needs it script.

*Expert Elite*
Alfred.NESWADBA
Posts: 8,962
Registered: ‎06-29-2007
Message 2 of 8 (526 Views)

Re: Script (Commands) to make filter?

06-14-2012 03:46 AM in reply to: vikasranga2

Hi,

 

what type of filter do you want to create?

If you want to select objects by properties then you should look to LISP and function SSGET (>>>details<<<)

If you mean any other filter like e.g. layerfilter ... let us know. A sample description what you want to filter out of what sum of ... would be helpful to support you.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Contributor
vikasranga2
Posts: 18
Registered: ‎06-13-2012
Message 3 of 8 (525 Views)

Re: Script (Commands) to make filter?

06-14-2012 03:59 AM in reply to: Alfred.NESWADBA

I want to make filter on the basis of Layers name.

 

e.g.: I have so many layers having suffix *fix, like A_fix, B_fix etc. I need the script which can filter those layers. 

 

After that script to select any filter too?

*Expert Elite*
Alfred.NESWADBA
Posts: 8,962
Registered: ‎06-29-2007
Message 4 of 8 (522 Views)

Re: Script (Commands) to make filter?

06-14-2012 04:06 AM in reply to: vikasranga2

Hi,

 

>> I need the script which can filter those layers.

Do you want to filter layers or to select objects on that layers (that's why I asked for a little description).

I assume now that you want to select object (and not layers), so try

_SELECT<ENTER>
(ssget "X" (list (cons 8 "*fix")))<ENTER>

<ENTER>

...is that what you are looking for?

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Contributor
vikasranga2
Posts: 18
Registered: ‎06-13-2012
Message 5 of 8 (520 Views)

Re: Script (Commands) to make filter?

06-14-2012 04:17 AM in reply to: Alfred.NESWADBA

Ok I am explaining whole, what I need?

 

I have two types of layer groups, one having suffix *fix, and other having suffix *cat. I want to get diffrent pdfs for those, *fix & *cat layers.

 

I have thought following steps:

1. Turn off all layers,

2. Make separate layer filter for *fix & *cat layers.

3. Turn on *fix layer filter.

4. Run the script to get pdf.

 

Yesterday I asked you how to turn off all layers, now I am not getting the script to make filter for *fix, and *cat layers, and then turn on any filter. So, I want this one. Can I have the ans. for step 2 &3?

 

Hope you understand the problem.

Contributor
vikasranga2
Posts: 18
Registered: ‎06-13-2012
Message 6 of 8 (519 Views)

Re: Script (Commands) to make filter?

06-14-2012 04:19 AM in reply to: vikasranga2

Can you give me any file, from which I can study all about commands, scripts, lisp and macros?

*Expert Elite*
Alfred.NESWADBA
Posts: 8,962
Registered: ‎06-29-2007
Message 7 of 8 (513 Views)

Re: Script (Commands) to make filter?

06-14-2012 04:31 AM in reply to: vikasranga2

Hi,

 

>> Can you give me any file, from which I can study all about commands, scripts, lisp and macros?

At least some thousands of pages in the help >>>for 2013 and search<<< or within >>>this PDF you showed me yesterday<<<

 

>> I have thought following steps:

>> 1. Turn off all layers,

>> 2. Make separate layer filter for *fix & *cat layers.

>> 3. Turn on *fix layer filter.

>> 4. Run the script to get pdf.

You can't turn on a layerfilter, and if you already know layernames with wildchars you even don't need >>>layerfilters<<<

 

All off ... we had that yesterday, now for on for the layernames like "*fix":

_-LAYER<ENTER>

_-ON<ENTER>

*fix<ENTER>

<ENTER>


 

HTH, - alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Contributor
vikasranga2
Posts: 18
Registered: ‎06-13-2012
Message 8 of 8 (509 Views)

Re: Script (Commands) to make filter?

06-14-2012 04:39 AM in reply to: Alfred.NESWADBA

Thank you, it worked.

 

:-)

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.