get the layer an object is on

Previous topic - Next topic

jvr14115

How do I get the name of the layer that an object is on?

I need to get a csv list with all objects in a scribus file.
so far that's working.
However, I also need to get the layer the object is on. I haven't found a way to do this:
- the layer(name) is not in the object properties.
- it would be possible to loop layers, but I havent found a way to select/loop the objects on that layer (only page).
- I thought selecting anabject might be a way to get the "active layer", but selecting the object does not activate the layer.

any ideas? if possible easy ones :)

utnik

hi jvr

Quote from: jvr14115 on November 18, 2018, 04:18:57 PM...I thought selecting anabject might be a way to get the "active layer", but selecting the object does not activate the layer.

it depends...
selecting an object in the 'outline' window activates the layer.

utnik

a.l.e

no, i could not find in the API a function to get that information.

there have been a few new commands that have been contributed by users in the last few weeks... and if you have brave enough, you could also get inspiration from one of those commits and propose a patch.

i can help you with finding how to get information from the scribus code...

it's probably better to create a new command, rather than extend the properties of the item... but i should first check how exactly you get the information.