Yes this is possible, you would need to iterate through the vNIC's that's been added to a given VM and extract out the necessary bits of information. To obtain the IP Address, you will need to ensure the VM is up and running VMware Tools, else you will not be able to extract that information.
You can extract both the IP info + portgroup by taking a look at the guestInfo property which is only exposed if you have VMware Tools running: http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.vm.GuestInfo.html
If you don't have VMware Tools running but would like to view the vNICs, then you can take a look at the VM's virtual hardware device array and extract out only the devices that is of type VirtualEthernetCard - http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.vm.VirtualHardware.html
Here are a few vSphere SDK for Perl examples that you can leverage to build a script that extracts what you need:
VMware vExpert 2009,2010
VMware scripts and resources at: http://www.virtuallyghetto.com/
If you find this information useful, please award points for "correct" or "helpful".
It really works.