Constrained spacing, varying object size
-
maybe it's me, or maybe it's the inability to accumulate values without a recursion error...
if i create a simple dynamic component which simply computes an object length based on count and the spacing based on count, i get what you expect: each object increases in size and so does the spacing. if i want to constrain the spacing to a single value, there is no way to readily determine the last position so set the next one + the space. i've seen several other postings where it seems like the answer was to provide an "array" (not directly support in a DC but you can fake one using a delimited string and string functions). if there was a way to accumulate values Y: = Y + (computed value) life would be so much simpler... is this something for SU8 or does anyone have a way to accumulate values? or should I stick with the "array" method? (will a real array be supported in the next release? maybe ruby functions? )
see attached for the problem...
spacing problem example
follow-up:so if i use "CHOOSE" as my "array" and "Copy" as my index, i create the layout desired. if would still be really nice to have the ability to dynamically compute the array and use it directly or even as a parameter to CHOOSE if necessary.
see attached to one solution.
spacing solution using CHOOSE and predefined list
i tried to see if CURRENT() would provide recursion on assignment which it does but the recursion only happens when the field is touched and then it persists (as an accumulator would...) but its result is not desirable for this exercisetrying to compute the array dynamically as a string etc doesn't solve the problem (because if it did i wouldn't have to compute it in a string... no recursion/accumulation...sigh) so instead i opted for creating the matrices in Excel and pasting into a number of custom attributes which is then selected by the user. takes a bit of horsepower with a number of choose() statements to process but it seems to be work OK.
having the ability to accumulate values and having real arrays is definitely on my list of improvements for the next release.
-
Glenn,
I've tried to follow your 'problem' and feel you may have answered your own questions ....... correctly!
Mike
-
yes, i spent some time trying to identify a better solution but currently none exist... so i thought i'd leave this information here in case other folks ran into it...
Advertisement