明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1804|回复: 0

如何用Autodesk Express Viewer在web上显示数据库里的dwf文件?

[复制链接]
发表于 2004-12-22 15:24:00 | 显示全部楼层 |阅读模式
下面这个网页可以正常显示dwf文件(利用Autodesk Express Viewer工具)

cad_view.asp

<%
if Request.QueryString ("pipe_num")<>"" then
pipe_num=Request.QueryString ("pipe_num")
else
pipe_num=543

end if
%>
<html>

<body>

<tr height="90%">
<td colspan="10" align="center">
<object id = "viewer"
classid="clsid:A662DA7E-CCB7-4743-B71A-D817F6D575DF"
codebase="http://www.autodesk.com/global/expressviewer/installer/ExpressViewerSetup.cab" width="100%" height="100%" >
<param name = "Src" value="images/<%=pipe_num%>.dwf">
</td>
</tr>
<br>

</body>

</html> 前面是在images文件夹里有几个dwf文件,可以显示,如果我的dwf文件以Binary 存在数据苦里,该如何显示啊??????
<%
dim s,dwf,num
if Request.QueryString ( "pipe_num ") < > " " then
num=Request.QueryString ( "pipe_num ")
else
num=543

end if
set connGraph=server.CreateObject( "ADODB.connection ")
conngraph.ConnectionString =session( "connection_string ")
conngraph.Open
set rec=server.createobject( "ADODB.recordset ")
strsql= "select * from pipe_map where pipe_num=' "&num& "' "
rec.open strsql,connGraph,1,1

Response.ContentType = "image/dwf" '什么意思?小弟不懂?
Response.BinaryWrite rec("pipe_map").GetChunk(750000) set rec=nothing
set connGraph=nothing
% >
<html >

<body >
<br >
<tr height= "90% " >
<td colspan= "10 " align= "center " >
<object id = "viewer "
classid= "clsid:A662DA7E-CCB7-4743-B71A-D817F6D575DF "
codebase= "http://www.autodesk.com/global/expressviewer/installer/ExpressViewerSetup.cab " width= "100% " height= "100% " >
<param name = "Src " value= "<%=dwf%> " >
</td >
</tr >
<br >

</body >

</html >
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-26 04:40 , Processed in 0.145764 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表