extract triangle indice like in obj

Dear Friend !

can someone tell me how to extract the VERTEX Indice just like in the obj format ?
for some special purpose i need to extract the vertext position and the indices

thanks alot

david