Private Sub Iterator_OpenError

Private Sub Iterator_OpenError

Anonymous
Not applicable
213 Views
2 Replies
Message 1 of 3

Private Sub Iterator_OpenError

Anonymous
Not applicable
Tony,

When I debug with a breakpoint at this event, the FileName is coming in as
"".

I tested it by trying to open a drawing that was allready open.

When it runs all I get is the "Failed to open " at the command prompt.

Private Sub Iterator_OpenError(ByVal FileName As String, ByVal SCode As
Long)
ThisDrawing.Utility.Prompt vbCrLf & "Failed to open " & FileName
End Sub

--
Rodney D. Lester
Systems Manager
GMS, Inc.
0 Likes
214 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Check to make sure that you are not adding any
empty strings to the Files property, because a
quick glance at the source indicates that this
is the only possible way this can happen.

I'll make a note to add some code to deal with
invalid strings in the Files property, but in
the mean time, the caller is responsible for
validiating these strings.

"Rodney D. Lester" wrote in message
news:007340C3FCC705652F93D2A92BC3813A@in.WebX.maYIadrTaRb...
> Tony,
>
> When I debug with a breakpoint at this event, the FileName is coming in as
> "".
>
> I tested it by trying to open a drawing that was allready open.
>
> When it runs all I get is the "Failed to open " at the command prompt.
>
> Private Sub Iterator_OpenError(ByVal FileName As String, ByVal SCode As
> Long)
> ThisDrawing.Utility.Prompt vbCrLf & "Failed to open " & FileName
> End Sub
>
> --
> Rodney D. Lester
> Systems Manager
> GMS, Inc.
>
>
0 Likes
Message 3 of 3

Anonymous
Not applicable
That was it... I was setting the first item in the .Files to a "" (not
intentionally).

Thanks


"Tony Tanzillo" wrote in message
news:A494F8057CCF991D07A047F94C9CECA9@in.WebX.maYIadrTaRb...
> Check to make sure that you are not adding any
> empty strings to the Files property, because a
> quick glance at the source indicates that this
> is the only possible way this can happen.
>
> I'll make a note to add some code to deal with
> invalid strings in the Files property, but in
> the mean time, the caller is responsible for
> validiating these strings.
>
> "Rodney D. Lester" wrote in message
> news:007340C3FCC705652F93D2A92BC3813A@in.WebX.maYIadrTaRb...
> > Tony,
> >
> > When I debug with a breakpoint at this event, the FileName is coming in
as
> > "".
> >
> > I tested it by trying to open a drawing that was allready open.
> >
> > When it runs all I get is the "Failed to open " at the command prompt.
> >
> > Private Sub Iterator_OpenError(ByVal FileName As String, ByVal SCode As
> > Long)
> > ThisDrawing.Utility.Prompt vbCrLf & "Failed to open " & FileName
> > End Sub
> >
> > --
> > Rodney D. Lester
> > Systems Manager
> > GMS, Inc.
> >
> >
>
>
0 Likes