AutoCAD 2013/2014/2015

AutoCAD 2013/2014/2015

Reply
Contributor
18 Posts
1 Kudo
Registered: ‎06-13-2012
Post 1 of 8
Accepted Solution

Script (Commands) to make filter?

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

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 -

*Expert Elite*
9,800 Posts
1,210 Kudos
Registered: ‎06-29-2007
Post 2 of 8

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
18 Posts
1 Kudo
Registered: ‎06-13-2012
Post 3 of 8

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*
9,800 Posts
1,210 Kudos
Registered: ‎06-29-2007
Post 4 of 8

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
18 Posts
1 Kudo
Registered: ‎06-13-2012
Post 5 of 8

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
18 Posts
1 Kudo
Registered: ‎06-13-2012
Post 6 of 8

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*
9,800 Posts
1,210 Kudos
Registered: ‎06-29-2007
Post 7 of 8

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
18 Posts
1 Kudo
Registered: ‎06-13-2012
Post 8 of 8

Re: Script (Commands) to make filter?

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

Thank you, it worked.

 

:-)

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post