Website Installation
Integrate VectorDraw 4.x Component in a Web Page

1. Downloading and running a setup.exe file (similar to ours) that installs Professional/Standard/Viewer Activex in the "client's" system.

2. Making a CAB file. If you want more information about this see MSDN article "Deploying ActiveX Controls on the Web with the Internet Component Download".
(NOTE: It is better not to use UNICODE versions because it can only work only with Windows2000 and XP.)

Instructions for making a CAB

Make a temporary Folder and place there the:

NOTE : This example is for vdpro. Don't forget to change vdpro with vdstd or vdview if you are using Standard or Viewer
Also change the clsid of the product . These are the three keys for clsid:

Create the files below with notepad :
 

File Name   Add this text with Notepad
MakeCab.BAT   MAKECAB.EXE /f vdrawnet.ddf
pause
     
vdrawnet.ddf   .OPTION EXPLICIT
.Set Cabinet=on
.Set Compress=on
.Set MaxDiskSize=CDROM
.Set ReservePerCabinetSize=6144
.Set DiskDirectoryTemplate=
.Set CompressionType=MSZIP
.Set CompressionLevel=7
.Set CompressionMemory=21
.Set CabinetNameTemplate="vdrawi4.cab"
"vdpro.ocx"
"vdimg.dll"
"OPENGL32.DLL"
"GLU32.DLL"
"vdrawnet.inf"
NOTE :Remove OPENGL32.DLL and GLU32.DLL if you are using the Standard version
     
vdrawnet.inf   [version]
; version signature (same for both NT and Win95) do not remove
signature="$CHICAGO$"
AdvancedINF=2.0

[Add.Code]
vdpro.ocx=vdpro.ocx
vdimg.dll=vdimg.dll
mfc42.dll=mfc42.dll
msvcrt.dll=msvcrt.dll
olepro32.dll=olepro32.dll
Opengl32.dll=Opengl32.dll
Glu32.dll=Glu32.dll

[msvcrt.dll]
hook=mfc42installer
FileVersion=6,0,8797,0

[mfc42.dll]
hook=mfc42installer
FileVersion=6,0,8665,0

[olepro32.dll]
hook=mfc42installer
FileVersion=5,0,4277,1

[Opengl32.dll]
file=thiscab
FileVersion=4,0,1381,4
DestDir=
;NOTE :Remove OPENGL32.DLL and GLU32.DLL if you are using the Standard version

[Glu32.dll]
file=thiscab
FileVersion=4,0,1381,1
DestDir=

[vdpro.ocx]
clsid={50EFAD92-4089-4653-AFA2-8F3CAFCBCE3A}
file=thiscab
RegisterServer=yes
FileVersion=4,2,6,1031
DestDir=

[vdimg.dll]
file=thiscab
RegisterServer=yes
FileVersion=5,0,0,1033
DestDir=

[mfc42installer]
file-win32-x86=http://activex.microsoft.com/controls/vc/mfc42.cab
run=%EXTRACT_DIR%\mfc42.exe
     
test.htm   <html>
<head>
<title>Professional OCX Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<script language="vbscript">
Function Load()
alert("Page Loaded.... Press the Open button to load the drawing")
vdpro.Actions.disable3d= True
vdpro.redraw
' vdpro.Actions.EnableAutoFocus = True
End Function

Sub btn1_click()
alert("Place the drawing with the name test.vdi in the folder draw in your webserver : http://www.mysite.com/draw/test.vdi")
vdpro.activedocument.open "http://www.mysite.com/draw/test.vdi"
End sub

Sub btn2_click()
vdpro.commandAction.LayerControl
End sub

Sub btn3_click()
vdpro.commandaction.pan
End sub

</script>
</head>
<body onload="Load()">
<p>

<OBJECT id="Object1" classid="clsid:5220cb21-c88d-11cf-b347-00aa00a28331" VIEWASTEXT>
<PARAM NAME="LPKPath" VALUE="vdprolpk.lpk">
</OBJECT>
<OBJECT id="vdpro" height="445" width="692" classid="clsid:50EFAD92-4089-4653-AFA2-8F3CAFCBCE3A" codebase="http://www.mysite.com/draw/vdrawi4.cab#version=4,2,6,1031" VIEWASTEXT>
<param name="_Version" value="263164">
<param name="_ExtentX" value="18309">
<param name="_ExtentY" value="11774">
<param name="_StockProps" value="0">
<param name="PanWaitTime" value="0">
<param name="PickSize" value="10">
<param name="CrossSize" value="20">
<param name="ScrollBar" value="3">
<param name="StatusBar" value="-1">
<param name="LicVAL" value="Contact our Sales department">
<param name="PropFileName" value>
<param name="VDrawRes" value>
<param name="MousePointer" value="0">
<param name="ActionValidates" value="256">
<param name="EnableToolTips" value="0">
<param name="EnableURLs" value="0">
<param name="WMFSaveSize" value="2000">
<param name="ShowWCSAxis" value="0">
<param name="LoadingInfo" value>
</OBJECT>
</p>
<P>
<INPUT id="Button1" type="button" value="Open Drawing www.mysite.com/draw/test.vdi" name="Button1" onclick="btn1_click">
<INPUT id="Button2" type="button" value="Layers" name="Button1" onclick="btn2_click">
<INPUT id="Button3" type="button" value="Pan" name="Button1" onclick="btn3_click">
</body>
</html>


Run the MakeCab.bat. This should produce the vdrawi4.cab file.

Upload this cab file in your server's location : http://www.mysite.com/draw
See the HTML code:
<OBJECT id="vdpro" height="445" width="692" classid="clsid:50EFAD92-4089-4653-AFA2-8F3CAFCBCE3A" codebase="http://www.mysite.com/draw/vdrawi4.cab#version=4,2,6,1031" VIEWASTEXT>

Run the lpk_tool.exe application, choose in the left column the "VectorDRaw Professional 4.x", Press Add , (in the right column should be only that, and then press "Save & exit" and give the name (in the temporary directory) "vdprolpk.lpk". This should produce the vdprolpk.lpk file.
See the code in the HTML :
<OBJECT classid="clsid:5220cb21-c88d-11cf-b347-00aa00a28331" VIEWASTEXT>
<PARAM NAME="LPKPath" VALUE="vdprolpk.lpk">
</OBJECT>

!!!!!The vdprolpk.lpk file must be in the same folder in your server as the htm files.

Upload in the http://www.mysite.com/draw directory of your webserver the test.htm, vdprolpk.lpk, vdrawi4.cab files and the a sample drawing saved as test.vdi.

You also need to update the licval value for your server. Please contact our sales department about that.
Open the page http://www.mysite.com/draw/test.htm in your IE.

.DWG/.DXF file support.

In order to support the .DWG/.DXF files within your web page you have two options:
1. VectorDraw File Converter Application must be installed in your client's machine. It is free and you can download it from our site.
2. Obtain the necessary rights for using OpenDesign™ Library from OpenDesign™ ().

In this case the vdxfiles4.dll must be distributed and OLE registered in your client's machine.
Also the DD_Root.dll must be placed in the same folder with the vdpro.ocx .This dll it is available from OpenDesign's  toolkit.

Also you have to modify the .ddf and .inf files as followed:
 

File Name   Add this text with Notepad
vdrawnet.ddf   .OPTION EXPLICIT
.Set Cabinet=on
.Set Compress=on
.Set MaxDiskSize=CDROM
.Set ReservePerCabinetSize=6144
.Set DiskDirectoryTemplate=
.Set CompressionType=MSZIP
.Set CompressionLevel=7
.Set CompressionMemory=21
.Set CabinetNameTemplate="vdrawi4.cab"
"vdpro.ocx"
"vdimg.dll"
"OPENGL32.DLL"
"GLU32.DLL"
"vdxfiles4.DLL"
"dd_root.DLL"
"msvcp60.DLL"

"vdrawnet.inf"

NOTE :Remove OPENGL32.DLL and GLU32.DLL if you are using the Standard version
     
vdrawnet.inf   [version]
; version signature (same for both NT and Win95) do not remove
signature="$CHICAGO$"
AdvancedINF=2.0

[Add.Code]
vdpro.ocx=vdpro.ocx
vdimg.dll=vdimg.dll
mfc42.dll=mfc42.dll
msvcrt.dll=msvcrt.dll
olepro32.dll=olepro32.dll
Opengl32.dll=Opengl32.dll
Glu32.dll=Glu32.dll
vdxfiles4.dll=vdxfiles4.dll
dd_root.dll=dd_root.dll
msvcp60.dll=msvcp60.dll


[msvcrt.dll]
hook=mfc42installer
FileVersion=6,0,8797,0

[mfc42.dll]
hook=mfc42installer
FileVersion=6,0,8665,0

[olepro32.dll]
hook=mfc42installer
FileVersion=5,0,4277,1

[Opengl32.dll]
file=thiscab
FileVersion=4,0,1381,4
DestDir=

;NOTE :Remove OPENGL32.DLL and GLU32.DLL if you are using the Standard version

[Glu32.dll]
file=thiscab
FileVersion=4,0,1381,1
DestDir=

[vdpro.ocx]
clsid={50EFAD92-4089-4653-AFA2-8F3CAFCBCE3A}
file=thiscab
RegisterServer=yes
FileVersion=4,2,6,1031
DestDir=

[vdimg.dll]
file=thiscab
RegisterServer=yes
FileVersion=5,0,0,1033
DestDir=

[vdxfiles4.dll]
file=thiscab
RegisterServer=yes
FileVersion=4,2,6,1031
DestDir=

[dd_root.dll]
file=thiscab
FileVersion=2,0,0,0
DestDir=

[mscvp60.dll]
file=thiscab
FileVersion=6,0,8168,0
DestDir=


[mfc42installer]
file-win32-x86=http://activex.microsoft.com/controls/vc/mfc42.cab
run=%EXTRACT_DIR%\mfc42.exe

Teigha  ©  by Open Design Alliance Inc. All rights reserved.

Copyright © VectorDraw Software Corporation, 1998-2004. All rights reserved.