Larr

(10059) Error occurred during file operation

Discussion created by Larr on Feb 28, 2014
Latest reply on Jun 11, 2014 by Larr

I'm getting the following error message from the SAX Basic Engine, when attempting to execute the GET line of code.

 

(10059) Error occurred during file operation

 

 

 

Dim lenToTPN As Integer

Dim MyPartLen As Integer

TPN = String(5," ")

Dim ComponentCompare As String

Dim fileText As String

 

sub main

 

index = 0

For Each nextComp In ActiveDocument.Components

ListComps$(index) = nextComp.Name

index = index + 1

ComponentCompare=nextComp.PartType

MyPartLen=Len(ComponentCompare)

Rem start my special code stuff

CharPos=InStrRev(FileText, ComponentCompare)

lenToTPN= CharPos+MyPartLen+1

Open "C:\Larry\test\schtest\test\67835-0.asc" For Binary  As #1

Get #1, lenToTPN, TPN

Close   

 

end sub

 

  I'm trying to get the next 5 characters from the file, that follow the location of lenToTPN variable, should be the location of the 5 characters that I want to read into the String variable TPN.  Please see attached screen shots of debugger screen.

  Any help, suggestions is appricated,

 

Thanks in advance,.

 

 

 

 

67835-0.asc

!PADS-POWERPCB-V3.0-MILS! DESIGN DATABASE ASCII FILE 2.0

*PART*

D1 DO15 61834

*SIGNAL* N1389173

R6.2 C2.1

*END*

Outcomes