This cannot be done with a macro because the length of the resulting array would depend on how many duplicates there were in the original, and macros cannot make variable-sized arrays. Instead you should use a conditional submodel and find some way of having the condition go false for those instances where the value is a duplicate of a previous one.
Of course that means that you have to have this on the diagram each place where you want to use the function. We are thinking about a new way of defining macros using model diagrams that would allow you to have such a function as a macro.
Result wouldbe variable-length
This cannot be done with a macro because the length of the resulting array would depend on how many duplicates there were in the original, and macros cannot make variable-sized arrays. Instead you should use a conditional submodel and find some way of having the condition go false for those instances where the value is a duplicate of a previous one.
Of course that means that you have to have this on the diagram each place where you want to use the function. We are thinking about a new way of defining macros using model diagrams that would allow you to have such a function as a macro.
thankyou
Thank you jaspert for the quick reply