Selecting and reading values in material list on drawings

Hello all;

I am new to the SolidWorks side of API and currently have a task of prompting the user to select a material list on a drawing and then read the values of the items in the material list. I have looked on this forum and find the searches all return something other than what I am trying to do. since this is a two part question I would be grateful for whatever one of these items I can get.

First part.

the user starts a command and is prompted for some information and then is asked to select one of the material list located on the drawing. I would like to use a filtered selection so that only a material list can be selected and not something else. is this something that is possible and if some do you have any example.

Second part.

I need to read the material list including the headers to find only some fields and then retrieve the values of the cells that contain the data I am looking for.

This data will be copied from the material list to be inserted into our ERP system for purchasing materials and typical job order paperwork.

I will be doing my final application in VB.NET but would take whatever examples are available.

Thanks in advance for any help you could provide on this.

Mike

SolidworksApi macros