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
Changing Views via VBA
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
86 Views, 3 Replies
04-02-2003 03:34 AM
I've created a form with the EV control. I'm able to load a drawing, toggle layers on and off, I stumped when it comes to switching views via code. I have named views that were created in AutoCAD r14, they appear when I click the layer button in the control, I just can't do it through VBA code. I've looked through the help files and found an example on how to cycle through each of the view names, but not how to change to a view.
Re: Changing Views via VBA
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-02-2003 04:35 AM in reply to:
TimL
I found it, its not very obvious (at least not to me) based on the help files.
Dim Viewer As AdPageView.IAdPageViewer
Set Viewer = CAdViewer1.Viewer
Viewer.[_View] = "LAB1"
Dim Viewer As AdPageView.IAdPageViewer
Set Viewer = CAdViewer1.Viewer
Viewer.[_View] = "LAB1"
Re:
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-02-2003 04:41 AM in reply to:
TimL
and of course none of the above post make sense because the HTTP interface. Let me try one more time;
Line1 Dim Viewer As AdPageView.IAdPageViewer
Line2 Set Viewer = CAdViewer1.Viewer
Line3 Viewer.[_View] = "PutNameHere"
Line1 Dim Viewer As AdPageView.IAdPageViewer
Line2 Set Viewer = CAdViewer1.Viewer
Line3 Viewer.[_View] = "PutNameHere"
*raot
Re:
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-02-2003 04:11 PM in reply to:
TimL
Here is a sample code:
Private Sub Command1_Click()
Dim viewer As IAdPageViewer
Set viewer =
CAdViewer1.viewer
Dim viewer As IAdPageViewer
Set viewer =
CAdViewer1.viewer
'Set the view
current.
viewer.view = viewer.NamedViews("v1")
End
Sub
current.
viewer.view = viewer.NamedViews("v1")
End
Sub
Private Sub Form_Load()
CAdViewer1.SourcePath = "C:/dwf.dwf"
End Sub
CAdViewer1.SourcePath = "C:/dwf.dwf"
End Sub
If you are embedding in an html page and wish to
pass it as a parameter then do as follows:
pass it as a parameter then do as follows:
http://tmp.dwf?namedview="v1"
cheers,
thilak
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"TimL" <tim_lehotsky> wrote in messageand
href="news:f154a6d.1@WebX.maYIadrTaRb">news:f154a6d.1@WebX.maYIadrTaRb...
of course none of the above post make sense because the HTTP interface. Let me
try one more time;
Line1 Dim Viewer As AdPageView.IAdPageViewer
Line2 Set Viewer =
CAdViewer1.Viewer
Line3 Viewer.[_View] =
"PutNameHere"

