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
Search by attributes
-
- Entwickler
- Posts: 4239
- Joined: Tue 19 Nov 2002 15:49
Re: Search by attributes
The search function of the Layer List has basic support for vector colors.
The search string
Code: Select all
&vec+(&linecolor=rgbff0000 &fillcolor=rgbff0000)
More complicated queries could be handled by scripting.
Martin
-
- Mitglied
- Posts: 615
- Joined: Thu 06 Oct 2011 08:08
Re: Search by attributes
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
Cheers,
Juan
-
- Entwickler
- Posts: 4239
- Joined: Tue 19 Nov 2002 15:49
Re: Search by attributes
Checking only the fill color is easy: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?
Code: Select all
&vec+&fillcolor=rgbff0000
Martin
-
- Mitglied
- Posts: 615
- Joined: Thu 06 Oct 2011 08:08
Re: Search by attributes
Awesome, thank you 

-
- Mitglied
- Posts: 615
- Joined: Thu 06 Oct 2011 08:08
Re: Search by attributes
Hi all,
Can this search command be turned into a script?
Cheers,
Juan
Can this search command be turned into a script?
Cheers,
Juan
-
- Entwickler
- Posts: 4239
- Joined: Tue 19 Nov 2002 15:49
Re: Search by attributes
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
-
- Mitglied
- Posts: 615
- Joined: Thu 06 Oct 2011 08:08
Re: Search by attributes
Thanks for pointing me out in the right direction.Martin Huber wrote: ↑Thu 25 Apr 2019 11:48 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).
Cheers,
Juan
-
- Mitglied
- Posts: 615
- Joined: Thu 06 Oct 2011 08:08
Re: Search by attributes
I'm not sure why but I'm not able to select any vector layer that contains this color value (#edd9b8) using this :
Cheers,
Juan
Code: Select all
&vec+&fillcolor=rgbedd9b8
Juan
You do not have the required permissions to view the files attached to this post.
-
- Entwickler
- Posts: 4190
- Joined: Mon 18 Nov 2002 15:30
- Location: Bad Gögging
Re: Search by attributes
I tested this right now here and it works fine.
Perhaps you should switch off and on the search function, sometimes this is necessary.
Perhaps you should switch off and on the search function, sometimes this is necessary.
-
- Mitglied
- Posts: 615
- Joined: Thu 06 Oct 2011 08:08
Re: Search by attributes
Thanks, but no luck for me hereGerhard Huber wrote: ↑Fri 26 Jul 2019 10:16 I tested this right now here and it works fine.
Perhaps you should switch off and on the search function, sometimes this is necessary.

Here is a small sample file where I need to select the vector layer using the script (since the real document has few dozens of that layer). For me the script works perfectly if the vector layer is pure red. Cheers,
Juan
You do not have the required permissions to view the files attached to this post.
-
- Entwickler
- Posts: 4190
- Joined: Mon 18 Nov 2002 15:30
- Location: Bad Gögging
Re: Search by attributes
I see the problem. That's float value issues. We will fix this in the next version of PhotoLine.
-
- Mitglied
- Posts: 615
- Joined: Thu 06 Oct 2011 08:08
Re: Search by attributes
Thank you for the confirmation.Gerhard Huber wrote: ↑Fri 26 Jul 2019 10:39 I see the problem. That's float value issues. We will fix this in the next version of PhotoLine.
Cheers,
Juan