I made a screenshot of the test, I warn you that the setup could be a little bit unpredictable and therefore frustrating because the accuracy of the trick depends of the location of the pegs and their orientation.
It would be much easier if toonboom developers would just integrate this concept automatically during the creation of the deformer so the orientation of the parts would be the right one… but it can be done manually.
https://assets.adobe.com/link/d41caab1-da1a-407e-b651-3bb53f83e589
The important things are highlighted in yellow, in order to link the values remember that you need to do 3 actions;
A) Open the bone properties and make the orientation value available for other layers to see, by clicking the white arrow and telling “local” (if it was local already most probably it wont become published, you should click the bezier editor button and then back to local). In order to make sure that it works you could for example look if the column became available in xsheet.
B) Go the the properties of the peg, select the white arrow at the left of the angle_z value and select Bezier/Bone_Orientation
C) Go back to the properties of the bone and this time we link the bone back to the peg: Bezier/Peg/Bone orientation
This ways the transformation seems to work in both ways… when you rotate the bone, the peg turns, when you rotate the peg the bone turns.
In the image you cans see a list with the values which I connected, I am representing the link with the “=” symbol
I did this a few times but I can hardly remember the best setup, I would need to make it a few times in order to remember… but it all depends on the hierarchy and the orientation, the position of the pegs and the orientation of the bones.
It is possible that if the hierarchy is not correct you would get some small gap between the IK bones and the deformer bones whenever you bend the leg a loot. this can be corrected by orienting the pegs properly and it is just cosmetic, when you move the mouse look at the drawing and not the skeleton, this way a small gap doesn’t really matter