rarteagasf Posted March 14, 2018 Share Posted March 14, 2018 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, Quote Link to comment Share on other sites More sharing options...
v_kyr Posted March 14, 2018 Share Posted March 14, 2018 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. John Rostron and rarteagasf 2 Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
John Rostron Posted March 14, 2018 Share Posted March 14, 2018 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 Quote 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 More sharing options...
rarteagasf Posted March 15, 2018 Author Share Posted March 15, 2018 Many thanks v_kyr for your clarification, I had tried many times without getting results. Thank you very much John Rostron. I'm going to try it with equations. Greetings, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.