This seems too simple and leaves me wondering what I am missing. If you are using a calculation to produce this string in the first place, just re-order the terms in a different calculation:
"M" & " 0 0" & Window Height & " " & Window Height & "0" & Window Width & " 0" & Window Width & " 0 0"
looks simple enough but table::svg is just sample data my typical svg strings can have 3000 nodes!
I need to reverse the resulting calculation in a new field
table::svg has to stay as it is because it gets exported to a .dxf file
This does not change my answer. Your original post shows a FileMaker calculation being used to produce the original value. Thus, a different calculation with the terms swapped around can produce the "re-ordered" version of this data.
Think the best thing is to forget about the calculation and get back to how I can go about reversing the result
I also need to reverse imported svg files that wont have been calculated so a different calculation is not going to work otherwise i would have done it as its quite simple.
Its not about why I need it but how I can achieve my aim
I haven't asked why you need it. I just don't see the point to devoting time to figuring out how to parse a potentially complex text entry when there is be a much simpler way to get the desired result.
As I see it, I've provided the answer you asked for. If it doesn't work for you, you need to explain why or any follow on suggestions may also fail to work for you.
Hi many thanks
I had a look at the custom function and its going the right direction for what I need
if anyone knows how the calculation could be edited to reverse in blocks of numbers instead of individually i would be most grateful
added a screenshot of first results where its obvious this wont work in its current form. and the calculation in my custom function
Case ( WordCount ( field ) ;
RightWords ( field ; 1 ) & " " &
Reverse ( LeftWords ( field ; WordCount ( field ) - 1 ) )
It looks like with 3000 nodes this might be a performance issue however (took about 10 seconds for about 3000 two-character words). This also leaves a trailing space so you could use Trim if that matters.
If I understand your specific example correctly the calculation field could be something like Trim ( "M " & Reverse ( Middle ( SVG ; 3 ; 99999 ) ) )
Brilliant Timothy :)
No idea how that calculation works but will study it.
I can see how you separated the "M" , is it possible to do the same for the close path function "z"
Its not a major issue just interested to see how that would work.
Performance wont be a major issue as I intend to store the larger svg files in a library with an original and a reversed version so the user wont need to wait.
"M " & ReverseWords ( MiddleWords ( SVG ; 2 ; WordCount ( SVG ) - 2 ) ) & "z" looks like it should work.