The padstack information is not exposed to Visual Basic. Macros Don't work well for getting information, just for changing it. You could try exporting ASCII information, then reading from that file. Pretty cumbersome. It will be easier to open the ASCII file in Excel, and use the Office VB to manipulate the data.
But if you use the Verify Design tool, you will at least know your minimum distance (design rule settings), any spacing that violates the design rules will show the actual distance in the Verify Design dialog box.
thank you for the answer.
the problem is that we have different spacing rules for the bga as we have in the surrounding pcb and we have some conditional rules for special nets.
with "verify design" i get a lot of violations in the area of the bga and so i must import other rules as .asc to control the bga-area (traces/vias between balls)
my idea was to solve this via a basic script in which i calculate errors in the bga-area automatically.
i think that i have to write a script which imports our .asc-rule-file, make "verify design", and save this "real" errors to a document before importing the original rule-file.
No need for a script. You can set separate design rules by component. Set your global SMD>trace clearance to 8 mils, set your BGA SMD>Trace to 5 mils. Autorouting and Dynamic routing, and Verify Design will respect the BGA Rules. You must have the Advanced Rules option, and this only work in PADS Router, not PADS Layout. But if you are using BGAs, you shoudl have the advanced rules, and you should be routing in the Router anyway.
I'd be very wary of using VB scripts as DRC. There's a good reason software developers run thousands of hours of beta testing before releasing something as critical as a DRC routine. It would be very easy for you to miss some minor detail that could give you false results. Plus, your VB routine will not help the routing tools at all, so you are going to spend a lot of time swapping rule sets and generating a lot of errors.