Search by attributes

Here everybody can post his problems with PhotoLine
Antworten
Juan
Mitglied
Beiträge: 611
Registriert: Do 06 Okt 2011 08:08

Search by attributes

Beitrag von Juan »

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
Beiträge: 4159
Registriert: Di 19 Nov 2002 15:49

Re: Search by attributes

Beitrag von Martin Huber »

Juan hat geschrieben: Do 07 Mär 2019 13:34Is 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: Alles auswählen

&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
Beiträge: 611
Registriert: Do 06 Okt 2011 08:08

Re: Search by attributes

Beitrag von Juan »

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
Beiträge: 4159
Registriert: Di 19 Nov 2002 15:49

Re: Search by attributes

Beitrag von Martin Huber »

Juan hat geschrieben: Do 07 Mär 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: Alles auswählen

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

Martin
Juan
Mitglied
Beiträge: 611
Registriert: Do 06 Okt 2011 08:08

Re: Search by attributes

Beitrag von Juan »

Awesome, thank you :)
Juan
Mitglied
Beiträge: 611
Registriert: Do 06 Okt 2011 08:08

Re: Search by attributes

Beitrag von Juan »

Hi all,

Can this search command be turned into a script?

Cheers,
Juan
Martin Huber
Entwickler
Entwickler
Beiträge: 4159
Registriert: Di 19 Nov 2002 15:49

Re: Search by attributes

Beitrag von Martin Huber »

Juan hat geschrieben: Di 23 Apr 2019 14:57Can 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
Juan
Mitglied
Beiträge: 611
Registriert: Do 06 Okt 2011 08:08

Re: Search by attributes

Beitrag von Juan »

Martin Huber hat geschrieben: Do 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).
Thanks for pointing me out in the right direction.

Cheers,
Juan
Juan
Mitglied
Beiträge: 611
Registriert: Do 06 Okt 2011 08:08

Re: Search by attributes

Beitrag von Juan »

I'm not sure why but I'm not able to select any vector layer that contains this color value (#edd9b8) using this

Code: Alles auswählen

&vec+&fillcolor=rgbedd9b8
:
Colorvalue.jpg
Colorvalue.jpg (22.66 KiB) 3872 mal betrachtet
Cheers,
Juan
Benutzeravatar
Gerhard Huber
Entwickler
Entwickler
Beiträge: 4143
Registriert: Mo 18 Nov 2002 15:30
Wohnort: Bad Gögging

Re: Search by attributes

Beitrag von Gerhard Huber »

I tested this right now here and it works fine.
Perhaps you should switch off and on the search function, sometimes this is necessary.
Juan
Mitglied
Beiträge: 611
Registriert: Do 06 Okt 2011 08:08

Re: Search by attributes

Beitrag von Juan »

Gerhard Huber hat geschrieben: Fr 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.
Thanks, but no luck for me here :(
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.
Color selection.pld
(2.62 KiB) 76-mal heruntergeladen
Cheers,
Juan
Benutzeravatar
Gerhard Huber
Entwickler
Entwickler
Beiträge: 4143
Registriert: Mo 18 Nov 2002 15:30
Wohnort: Bad Gögging

Re: Search by attributes

Beitrag von Gerhard Huber »

I see the problem. That's float value issues. We will fix this in the next version of PhotoLine.
Juan
Mitglied
Beiträge: 611
Registriert: Do 06 Okt 2011 08:08

Re: Search by attributes

Beitrag von Juan »

Gerhard Huber hat geschrieben: Fr 26 Jul 2019 10:39 I see the problem. That's float value issues. We will fix this in the next version of PhotoLine.
Thank you for the confirmation.

Cheers,
Juan
Antworten