Jump to content
Our response time is longer than usual currently. We're working to answer users as quickly as possible and thank you for your continued patience.

Problem when using expressions in macros // Problema al usar expresiones en macros


Recommended Posts

Estoy intentando incrustar una imagen que debería tener el mayor tamaño posible para que se vea en su totalidad independientemente de las dimensiones del documento base.
Para ello, en el Panel Transformar, vinculo el ancho y el alto e introduzco en cualquiera de los dos la siguiente fórmula: Min(sh;sw) —curiosamente no funciona si uso la coma como separador— y se consigue el objetivo propuesto.
El problema me ocurre cuando hago una macro para automatizar esta tarea, ya que  no me reconoce la fórmula anterior. Al parecer lo que almacena es el resultado de la misma.
¿Alguien sabe si es posible incluir una fórmula en una macro y que los cálculos se realicen correctamente en cada uso?
Gracias,

------------

I'm trying to embed an image that should be as large as possible so that it looks completely independent of the dimensions of the base document.
To do this, in the Transform Panel, I link the width and height and I enter the following formula in either of them: Min (sh; sw) -curiously it does not work if I use the comma as a separator- and the proposed goal is achieved.
The problem occurs to me when I make a macro to automate this task, since it does not recognize the previous formula. Apparently what you store is the result of it.
Does anyone know if it is possible to include a formula in a macro and that the calculations are performed correctly in each use?
Thank you,

Link to comment
Share on other sites

No sadly it doesn't work like that for Affinity expressions, meaning these are always value expanded during initial recording and not kept as dynamic evaluated values. Thus when you replay a macro it doesn't dynamically (re)calculate a previously inserted expression, since it recorded the previously expanded values and takes those into account.

So the whole with expressions is pretty useless for trying to build up some dynamic behaving macros at all here! - See also an similar themed older thread:

Related to ...

Quote

...Min (sh; sw) -curiously it does not work if I use the comma as a separator...

... yes this doesn't work with a comma as a function value seperator at all here and is possible overall wrong documented in the online help. - All in all the Affinity documentation is pretty short, limited and weak on the usage of expressions and macros etc. here, so the whole is finally always more a matter of usage try and error instead.

☛ Affinity Designer 1.10.5 ◆ Affinity Photo 1.10.5 ◆ OSX El Capitan

Link to comment
Share on other sites

What usually works in these circumstances is Filter > Distort > Equations. You can enter formulae to change the width or height  and they do work in macros. See my tutorial here, which might help.

John

Windows 10, Affinity Photo 1.10.5 Designer 1.10.5 and Publisher 1.10.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.