Community
DWF
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VB.net 2005 Iterate through Pages error

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
209 Views, 2 Replies

VB.net 2005 Iterate through Pages error

I'm trying to get the example in the api documentation that iterates through
pages and lists their names to work. But for some reason Design Review seems
to crash each time it reaches the code below. I have the Design Review 2007
SP1 installed but still seems to crash? Is this a limitation in Design
Review 2007 SP1 with VS2005?
PageViewer = Nothing

PageViewer = CExpressViewerControl1.DocumentHandler

This code below continues to crash?

Pages = PageViewer.Pages



Here is the code from the API documentation.

Private Sub IterateThroughPages()


'Iterate through the pages in the current DWF file.

Dim Pages As AdCommon.IAdCollection

Dim Page As EPlotModel.IAdPage

Dim msg As String

Pages = PageViewer.Pages

'Loop through the pages in the DWF file and print the name and order to the
debug
'window.

For Each Page In Pages

msg = msg & "Page Name: " & Page.Name & " | Page Order: " & Page.Order &
vbCrLf

Next

MsgBox(msg)

End Sub
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

Mark, please provide a sample of your application and a sample DWF. I'll
see what I can do.

"Mark Douglas" wrote in message
news:5429728@discussion.autodesk.com...
I'm trying to get the example in the api documentation that iterates through
pages and lists their names to work. But for some reason Design Review seems
to crash each time it reaches the code below. I have the Design Review 2007
SP1 installed but still seems to crash? Is this a limitation in Design
Review 2007 SP1 with VS2005?
PageViewer = Nothing

PageViewer = CExpressViewerControl1.DocumentHandler

This code below continues to crash?

Pages = PageViewer.Pages



Here is the code from the API documentation.

Private Sub IterateThroughPages()


'Iterate through the pages in the current DWF file.

Dim Pages As AdCommon.IAdCollection

Dim Page As EPlotModel.IAdPage

Dim msg As String

Pages = PageViewer.Pages

'Loop through the pages in the DWF file and print the name and order to the
debug
'window.

For Each Page In Pages

msg = msg & "Page Name: " & Page.Name & " | Page Order: " & Page.Order &
vbCrLf

Next

MsgBox(msg)

End Sub
Message 3 of 3
Anonymous
in reply to: Anonymous

By the way, you can send it directly to me at
john_dot_schmier_@_autodesk_dot_com

"John Schmier (ADSK)" wrote in message
news:5430353@discussion.autodesk.com...
Mark, please provide a sample of your application and a sample DWF. I'll
see what I can do.

"Mark Douglas" wrote in message
news:5429728@discussion.autodesk.com...
I'm trying to get the example in the api documentation that iterates through
pages and lists their names to work. But for some reason Design Review seems
to crash each time it reaches the code below. I have the Design Review 2007
SP1 installed but still seems to crash? Is this a limitation in Design
Review 2007 SP1 with VS2005?
PageViewer = Nothing

PageViewer = CExpressViewerControl1.DocumentHandler

This code below continues to crash?

Pages = PageViewer.Pages



Here is the code from the API documentation.

Private Sub IterateThroughPages()


'Iterate through the pages in the current DWF file.

Dim Pages As AdCommon.IAdCollection

Dim Page As EPlotModel.IAdPage

Dim msg As String

Pages = PageViewer.Pages

'Loop through the pages in the DWF file and print the name and order to the
debug
'window.

For Each Page In Pages

msg = msg & "Page Name: " & Page.Name & " | Page Order: " & Page.Order &
vbCrLf

Next

MsgBox(msg)

End Sub

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost

 

”Tips

 

”Services