reference position of an object (X/Y) to the X/Y properties of another object.

Previous topic - Next topic

drobble

Here is another newbie question.
I have a number of text boxes in my design.
The text boxes are aligned in rows/columns
I'm wondering is it possible, perhaps through a short-key, to reference the property of 'this' object (X,Y, "width" or "height") to the property of another object on the page?

Maybe the name of the object could be used for this reference.
TIA

a.l.e

You don't tell us what you want to achieve with that.

Scribus does have some variables in the measurement (pagewidth, ...) but cannot reference sizes of arbitrary frames.

The sounds good, but I wonder how fast it would get hard to manage (at the end, you will probably want to have cyclic definitions...).

The closest thing we have is the idea of welding, but it currently only works for the position and not for the size.


With the little information available, my suggestion would be to go for a typographic grid.

In this former reply https://forums.scribus.net/index.php?msg=24596 you can see a screenshot of such a structure.

Nermander

I am thinking that what you may be looking for is the Align and distribute function.

And maybe it would be an idea to use Guides a lot more.

If you want it to be "dynamic" (like a variable), I think you are out of luck. But in some cases grouping the objects may be a suitable solution.

drobble

After a period of absence... thanks for the tips.
I'm still trying to find my way through Scribus.  ;)

joseb

Hello,

After reading this thread and others, I thought about creating a script for Scribus that can synchronize the size or position of several objects using a selected one as a reference.

To run the script, the name of each object must contain a keyword (or two or three reference words...).

How to use:
- Name the objects with one or more keywords.
- The script will search within each object name for the specified keyword (the keyword can be at the beginning, middle, or end of the name).
- Select a reference object.
- Run the script.
- Enter the keyword.
- Select what you want to modify. For example: size and position at the same time... or just the width... or just the X position.
- When finished, all objects with that keyword will copy the size/position of the object selected just before running the script.

Attached is a GIF demonstration video:


The script is as follows:
synchronize_geometry_bynamecontains.py

I am not a programmer and the script is written with AI. I am leaving it here in case the team that develops Scribus would like to use it as a starting point for developing the function.

POSSIBLE USES OF THE SCRIPT
- Reference position of an object (X/Y) to the X/Y properties of another object.
- Copy the size and position of many objects at once throughout the document.
- Something similar or close to what master pages can do with editable objects... For example, if a text frame is repeated on all pages and we want to edit its size and position, the script helps to resize them all in reference to the object we select.

IMPROVEMENTS SCRIBUS NEEDS TO HELP THE SCRIPT
- Is it possible to rename many objects at once in Scribus?