Search by attributes

Here everybody can post his problems with PhotoLine
Juan
Mitglied
Posts: 486
Joined: Thu 06 Oct 2011 08:08

Search by attributes

Post by Juan » Thu 07 Mar 2019 13:34

Hi all,

Is it possible to search/select only the layers that match the same attributes?
Let me explain further, I have a PDF from a CAD software and I need to select all the layers that has the same RGB values.

Cheers,
Juan

Martin Huber
Entwickler
Entwickler
Posts: 3419
Joined: Tue 19 Nov 2002 15:49

Re: Search by attributes

Post by Martin Huber » Thu 07 Mar 2019 19:08

Juan wrote:
Thu 07 Mar 2019 13:34
Is it possible to search/select only the layers that match the same attributes?
Let me explain further, I have a PDF from a CAD software and I need to select all the layers that has the same RGB values.
The search function of the Layer List has basic support for vector colors.
The search string

Code: Select all

&vec+(&linecolor=rgbff0000 &fillcolor=rgbff0000)
will list all vector layers whose fill color or line color is red. The color format is an usual HTML color value.

More complicated queries could be handled by scripting.

Martin

Juan
Mitglied
Posts: 486
Joined: Thu 06 Oct 2011 08:08

Re: Search by attributes

Post by Juan » Thu 07 Mar 2019 20:54

Thank you so much for the script, now I have another question. If I want to select only by fill color and ignore the line color (many vector layers has different line colors,that's why). In my case specifically the vector layers have color fill but the line is set to 0% Opacity. Is it possible?

Cheers,
Juan

Martin Huber
Entwickler
Entwickler
Posts: 3419
Joined: Tue 19 Nov 2002 15:49

Re: Search by attributes

Post by Martin Huber » Fri 08 Mar 2019 15:16

Juan wrote:
Thu 07 Mar 2019 20:54
Thank you so much for the script, now I have another question. If I want to select only by fill color and ignore the line color (many vector layers has different line colors,that's why). In my case specifically the vector layers have color fill but the line is set to 0% Opacity. Is it possible?
Checking only the fill color is easy:

Code: Select all

&vec+&fillcolor=rgbff0000
You can't check the opacity of the color, though.

Martin

Juan
Mitglied
Posts: 486
Joined: Thu 06 Oct 2011 08:08

Re: Search by attributes

Post by Juan » Mon 11 Mar 2019 10:11

Awesome, thank you :)

Juan
Mitglied
Posts: 486
Joined: Thu 06 Oct 2011 08:08

Re: Search by attributes

Post by Juan » Tue 23 Apr 2019 14:57

Hi all,

Can this search command be turned into a script?

Cheers,
Juan

Martin Huber
Entwickler
Entwickler
Posts: 3419
Joined: Tue 19 Nov 2002 15:49

Re: Search by attributes

Post by Martin Huber » Thu 25 Apr 2019 11:48

Juan wrote:
Tue 23 Apr 2019 14:57
Can this search command be turned into a script?
I don't quite understand what you mean.
You can't write a script that modifies which layers are visible in the Layer List.
You can write a script that selects layers depending on their attributes or edit them depending on their attributes. There are sample scripts that perform editing (DashedRedLine, DoubleLineWidth, TextReplaceRGBBlack).

Martin