Mostafa
Hi there
I personally wouldn't recommend auto building attachments because in my experience that creates suboptimal setups that require work to investigate after build.
If you really want to though, here are some ideas, they will involve some scripting knowledge.
Make a fiber on the muscle, Ziva will choose some endpoints for you. Use the endpoints map to get those vertices, grow the selection a little, and attach to the nearest bone. This might work for a bicep, but a muscle with a large attachment zone like the latissimus it won't be as effective.
You could also use the proximity selection tool in a script, i.e. this command:
float $radius = 1.0;
zSelectVerticesByProximityRadius $radius;
Run this for every muscle/bone combination and if there's no vertices within the radius, don't build an attachment.
Thanks