Original Post
Hey, I'm new here and i have a question. I'm making a program for some people and i need to extract the mesh names and number of faces from an .ase file. I don't want anything else other than that. I've tried coding it myself: Public faces(0) As String Public numFaces As Integer = 0 Public names(0) As String Public numNames As Integer = 0 Public lines(0) As String Public numLines As Integer = 0 Sub Main() Console.WriteLine("ASE file (relative to the C:/ drive):") Dim line As String = "crap" Dim file As String = "C:/" + Console.ReadLine() Dim allText As String = ReadWholeFile(file) Console.Write(allText) Console.WriteLine("-- Mesh -- # Faces --") Dim reader As System.IO.TextReader = New System.IO.StreamReader(file) Do 'Array.Resize(lines, numLines) ReDim Preserve lines(numLines) lines(numLines) = reader.ReadLine() numLines += 1 Loop While Not lines(numLines - 1) = Nothing Dim i As Integer For i = 0 To numLines - 1 Step 1 If FindName(lines(i)) = True Then If Not names(numNames) = Nothing Then numNames += 1 lines(i).Remove(0, 12) lines(i).Replace("""", "") ReDim Preserve names(numNames) names(numNames) = lines(i) End If End If If FindFaces(lines(i)) = True Then If Not names(numNames) = Nothing Then numFaces += 1 lines(i).Remove(0, 15) ReDim Preserve faces(numFaces) faces(numNames) = lines(i) End If End If Next For i = 0 To numNames Step 1 Console.WriteLine(names(i) + " -- " + faces(i)) Next reader.Close() Console.ReadLine() End Sub This doesn't return anything. I'm using VB.NET. Could you help me? [Edited by - X Enterprises on September 11, 2008 5:23:08 PM]