Also, searching the forum may be a good way to get started on this task. For example, @staylor has some python code in this thread that appears to iterate through the rebar elements in a container to total the length of the bars- it could be modified or expanded to “explode” the container by removing them.
(Edit: I guess this is based on a forums post by @Organon , both links below.)