导航

嵌入了Autodesk Express Viewer用于查看dwf文件

Posted on 2010-06-06 18:27  kingwangzhen  阅读(2229)  评论(1编辑  收藏  举报

呵呵,你到autodesk的网站上下载免费的dwfviewer,安装后看他的帮助文件,其中有“在   HTML   文件中嵌入   Autodesk   DWF   Viewer”,说的很详细:
<html>
<head>
<script type="text/javascript" FOR="ADViewer" EVENT="OnEndLoadItem(ItemName,Data,Result)">
 // ####################################
 // Event for type of DWF loaded
 // ####################################
  if (ItemName == "SECTION")
  {
   ADViewer.ExecuteCommand('FITTOWINDOW');
   //FillContent();
  }   
   
  if (ItemName == "VIEWER")
  {
      //Turn off all the UI
      Commands = ADViewer.ECompositeViewer.Commands;
      Commands('TOOLBAR').Toggled = false; // hide standard toolbar
      Commands('ANIMATIONBAR').Toggled = false; // hide Animation bar
      Commands('DATAFRAMEUI').Toggled = false; // hide data pane
      Commands("GRIDROLLOVER").Toggled = false; // hide the grid roll over (up arrow)
      Commands("CANVASTITLE").Toggled = false; // hide canvas title bar      
  }
  
</script>
<title></title>
</head>
<body>
<object   id="ADViewer"  
classid= "clsid:A662DA7E-CCB7-4743-B71A-D817F6D575DF"
CODEBASE= "http://www.autodesk.com/global/expressviewer/installer/ExpressViewerSetup.cab" width="800" height="600" border="1">  
<PARAM   NAME= "Src"   VALUE="http://www.autodesk.com/global/expressviewer/installer/sample.dwf"/>

</object>

</body>
</html>