简体   繁体   English

如何获取AutoCAD文件(.dwg)以查看缩放和平移并在Web应用程序上获取实体

[英]How to get AutoCAD file (.dwg) to view zoom pan and get entity on web application

I try to get show AutoCAD file (.dwg) to display file 我尝试获取显示AutoCAD文件(.dwg)以显示文件

And I need to view, pan, zoom and click to view entity 我需要查看,平移,缩放并单击以查看实体

So now I use CadLib 4.0 in Win Application can be use, 所以现在我在Win Application中使用CadLib 4.0可以使用,

but in Web Application it will can not be to do right that. 但是在Web应用程序中将无法做到这一点。

please hint to find this solution. 请提示找到该解决方案。

Actually Autodesk offers a WebGL/HTML viewer that can embed on any webpage (or any app, desktop or mobile). 实际上,Autodesk提供了一个WebGL / HTML查看器,该查看器可以嵌入任何网页(或任何应用程序,台式机或移动设备)中。 No plugin or additional install is required. 无需插件或其他安装。

You'll need to upload, translate, then show on your page. 您需要上传,翻译,然后在页面上显示。 We have APIs for server and client side. 我们有用于服务器端和客户端的API。

See complement documentation (and keys) at http://developer.autodesk.com 请参阅补充文档(和键), 网址http://developer.autodesk.com。

Presten and Walmsley reported here and here that you can use their viewr in order to do this. Presten和Walmsley 在这里这里报告您可以使用他们的查看器来执行此操作。 It can pan and zoom but maybe not be able to select entity. 它可以平移和缩放,但可能无法选择实体。 The guide : 导游 :

How to use: Render just the drop target for the widget 使用方法:仅渲染小部件的放置目标

Include widget.css Include JQuery if it has not already been included on your website Include widget.js Instantiate adskViewerWidget() Call init("#elementID", true) and pass the DOM element where you want the A360 Viewer Widget to be rendered and true to indicate that only the drop target should be rendered. 包括widget.css包括JQuery(如果尚未包含在您的网站中)包括widget.js实例化adskViewerWidget()调用init(“#elementID”,true)并将DOM元素传递到您要呈现A360 Viewer Widget的位置,并为true,指示仅应渲染放置目标。

<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>A360 Viewer Widget Embedding Example</title>
    <link href="https://360.autodesk.com/Content/css/a360Viewer/widget.css" rel="stylesheet" type="text/css">
    <script src="http://code.jquery.com/jquery-1.11.3.min.js" type="text/javascript"></script>
    <script src="https://360.autodesk.com/Scripts/a360Viewer/widget.js" type="text/javascript"></script>
</head>
<body>
    <div id="a360ViewerWidget" style="width: 200px">
    </div>
    <script type="text/javascript">
        var adskViewerWidget = adskViewerWidget();
        adskViewerWidget.Init('#a360ViewerWidget', true);
    </script>
</body>
</html>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM