Skip to main content
Archived

Add ability to add functions to the Arithmetic/Text editor

Related products:Transformers
  • September 17, 2020
  • 1 reply
  • 34 views

michaelpascoe

Hello all,


It would be great to be able to define a python function in a workspace that is then callable from within the Arithmetic Editor of Transformers within that workspace. Similiar to how you can call the the built in functions such as @degToRad(<float>), @min(<float>,<float>,...) etc.


This would be useful in situations where the value you are trying to find requires some temporary state or where the logic is complex. As an example of the former I regularly find I need to calculate the smallest difference between two angles. I then have to write multiple entries in an AttributeCreator to do this. If I could write a Python function in the workspace then call it from the Arithmetic Editor I would only need to define one entry in AttributeCreator.


This also has the advantage that the function can then be used in multiple places in the workspace without having to redefine that logic each time.


Original post about this:

https://community.safe.com/s/question/0D54Q000083BN47SAG/is-it-possible-to-add-functions-to-be-available-in-the-arithmetictext-editor


Let me know what you think.


Thanks


Michael

1 reply

LizAtSafe
Safer
Forum|alt.badge.img+21
  • Safer
  • April 5, 2025
OpenArchived