DWF Viewer (Read Only)
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Layer Controls in Visual Basic

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
400 Views, 3 Replies

Layer Controls in Visual Basic

I want to be able to turn layers on and off with a check box in VB, I'm having problems turning individual layers on and off. Can someone clue me into the code needed? Thanks
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

I found this codebelow, I tried it but I get an invalid Character error for the underscore. Any one know what I have wrong here is my code for that part.

CAdViewer.Viewer._layerOff = "XSTM, XSTMTXT"


Message 3 of 4
Anonymous
in reply to: Anonymous

Here is a sample VB code that works
fine:

 

Private Sub Command1_Click()
   
Dim pv As IAdPageViewer
    Set pv =
CAdViewer1.Viewer
   
    pv.[_LayersOff] =
"0, Layer1"
End Sub

 

Private Sub Form_Load()
   
CAdViewer1.SourcePath = "C:/dwf.dwf"
End Sub

cheers,

thilak

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
found this codebelow, I tried it but I get an invalid Character error for the
underscore. Any one know what I have wrong here is my code for that part.

CAdViewer.Viewer._layerOff = "XSTM, XSTMTXT"


<These are hidden parameters and they are available from <VB, but
they are not
<available from VB Script.

<_LayersOn and _LayersOff are parameters, so the correct <syntax is.

<_LayersOn = "Layer1,Layer2"

<_LayersOff = "Layer3,Layer4"

<If you want to load a web page with more then one layer <turned off
at load
<time I would use the
ViewerParams.

Message 4 of 4
Anonymous
in reply to: Anonymous

Thanks that did it.

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

Post to forums  

Autodesk Design & Make Report