Autodesk DWF Viewer
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Cycling through each layer in a .dwf with VB
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
100 Views, 3 Replies
04-08-2003 06:11 AM
Can someone post sample code to cycle through each layer in a dwf using something like a For to Next statement in VB. I've been looking forever. I found sample code in this forum; "for each layer in AdView.Viewer.Layers" but it doesn't work. Thanks
Re: Cycling through each layer in a .dwf with VB
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-08-2003 11:15 AM in reply to:
TimL
Playing with the code It seams if I use a msgbox statement between loading the source file and the code to cycle through each layer, the code that I said above doesn't work does. I remember reading about a waituntilpageload method in the api help file. When I look at the VBA sample though it doesn't list a call to this method, just some code to turn off the tool bar. I looked in the object browser but didn't find any reference to the waituntilpageload method there either. I tried using the sample code to turn off the toolbar, but that had no effect.
Am I missing something??
Am I missing something??
*Bob
Re: Cycling through each layer in a .dwf with VB
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-08-2003 09:13 PM in reply to:
TimL
Dim viewer As IAdPageViewer
Dim layer As CLayer
CAdViewer1.SourcePath = "c:\????" 'Set to dwf
Set viewer = CAdViewer1.viewer
viewer.WaitForPageLoaded
For Each layer In viewer.Layers
Debug.Print layer.Name
Next
"TimL" wrote in message news:f156a11.-1@WebX.maYIadrTaRb...
> Can someone post sample code to cycle through each layer in a dwf using
something like a For to Next statement in VB. I've been looking forever. I
found sample code in this forum; "for each layer in AdView.Viewer.Layers"
but it doesn't work. Thanks
Dim layer As CLayer
CAdViewer1.SourcePath = "c:\????" 'Set to dwf
Set viewer = CAdViewer1.viewer
viewer.WaitForPageLoaded
For Each layer In viewer.Layers
Debug.Print layer.Name
Next
"TimL"
> Can someone post sample code to cycle through each layer in a dwf using
something like a For to Next statement in VB. I've been looking forever. I
found sample code in this forum; "for each layer in AdView.Viewer.Layers"
but it doesn't work. Thanks
Re:
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-08-2003 11:33 PM in reply to:
TimL
Thanks, I really appreciate your help, the API help file Autodesk supplies is terrible.
