How to use Volo Viewer

How to use Volo Viewer

Anonymous
Not applicable
134 Views
1 Reply
Message 1 of 2

How to use Volo Viewer

Anonymous
Not applicable
Dear all,

I am having a application requirement in which i need to use Volo viewer
to show a drawing in the VB screen itself. I have to pass the drawing
file name to the voloview control. I tried using ole but couldn't
figure out how to dynamically change the file name . If i use the
INVOKEURL property the application opens up Internet explorer 4.0 and
shows the drawing in that. This i don't want to happen.

The drawing name will be dynamic as i have to perform a query and get
the result.

Please help. This is quite urgent as this will impact the application
design.

Thanks for all your help.

Cheers

G.Rajesh
0 Likes
135 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Try this:

This example has a command dialog box for the user to
select the drawing file and view it on a VB6-generated form.

Private Sub cmdGetDrawing_Click()

Dim ViewDwgFileName As String

AvViewX1.Visible = True
AvViewX1.BorderStyle = 1
CommonDialog1.FileName = "\\CAE\caed\NPDRAWINGS\PE\" & "*.dwg"
CommonDialog1.Filter = "DWG files (*.DWG)|*.DWG|All files (*.*)|*.*"
CommonDialog1.Action = 1

ViewDwgFileName = CommonDialog1.FileName
AvViewX1.src = ViewDwgFileName
If CommonDialog1.FileName = "" Then Exit Sub

Call AvViewX1.GetDrawingExtents(0, 0, 0, 0)

End Sub

Put this in your Module:
Sub GetDrawingExtents()

Dim dLeft As Double
Dim dRight As Double
Dim dBottom As Double
Dim dTop As Double

'The coordinate values are passed by reference.
AvViewX1.GetDrawingExtents dLeft, dRight, dBottom, dTop

End Sub

I hope this helps. The documentation is very limited - it took me a while
to work with the
default zoom - the weakeness with the above code is an unresolved issue I
have concerning
zoom extents in volo - it does not have the capability parallel to the
Autocad viewer to
accomplish this (as an object arx). I posted a request in the newsgroup and
haven't
had a snip of a solution - but the above code gets you to bring the file IN.

Deb Silverman
CAE Systems Engineer
Nichols Portland
0 Likes