Exporting Chops to control Group Number (or variable first?)

Hi all,
Have a model for a wall we will be projection mapping on.
Figured out, Using Facet SOP → Primitive SOP, and changing the group to the # of the primitive, you can control each separate primitive to move them around - awesome.
However, I want to use a Count CHOP to count through each primitive and move them one at a time in order.
The issue is, I can’t seem to export the chop into the Source Group field.
How would I go about getting that number from the Count CHOP (which basically counts from 1-142) and export it into the Source Group field? When I try to do so it just shows up as text.
One thread suggested using a Delete SOP and only get the primitive you want - however this would essentially mean I would need 142 different operators, one for each primitive.
All I really need to do is dynamically be able to change the Source Group field on the primitive SOP (or any SOP after that for that matter).
Do I need to assign a global variable, export the chop to that variable, and then use that variable as the Source Group? I’m kind of clueless on how to go about doing that.
Thanks for the help, and if I’m not making any sense I can upload the patch so you can see specifically what I mean.
Cheers! - slv

Instead of exporting use a reference / expression: op(‘yourchop’)['channame ']

Or try a group SOP and export / reference your primNumber there, then use that group on the primitive SOP

Thanks Achim, but I still can’t seem to get it working.
When I input the text as you showed in the Variable window, it removes all of the ’ (apostrophes) and spaces the text out, I get $Count working in the primitive SOP Source Group parameter but gives me the text instead of the numerical value (which is all I need in this place, since a single number as the group will control that specific primitive which is what I need in this case)
I have attached a screenshot showing what I mean.
If not the Variable/Macros window, where should I be entering the variable?
I will try the other method but I need to start wrapping my head around variables in general because exporting chops all over the place can get super messy :stuck_out_tongue:
Thanks!

I think I got it, at least working in a preliminary sense.
Rob’s patch in this thread helped a bit:
viewtopic.php?f=27&t=4060

here’s an example
test.tox (1.13 KB)

Thanks Achim! Gotta love when that thing you’re banging your head against the wall suddenly clicks