Autodesk Navisworks API
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Is there a way to display the Naviswork viewer control in a web browser(AS P.NET)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
We have the navisworks viewer control working in windows application.
Is there a way to display the navisworks viewer in a web browser(ASP.NET), I mean in a .aspx page
if possible please post me a sample piece of code.
Prasanth.k
Re: Is there a way to display the Naviswork viewer control in a web browser(AS P.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi prashanthmallu,
I've managed to get the control working in an ASP.Net page, but I'm having some problem getting the controls for selecting other .nwd files etc working...
I just asked a question about it and posted a link to some blog posts by Xiaodong Liang http://forums.autodesk.com/t5/Autodesk-Navisworks-
Hope that helps you.
Cheers....
John
Re: Is there a way to display the Naviswork viewer control in a web browser(AS P.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hello,
using the below code, i too was able to view the .nwd file on a .aspx page.(using Navisworks Redistributable Control 10 SDI)
Now i am trying to do a search in the model?But it seems we need a licensed version to execute this code.
i am getting an error "Microsoft JScript runtime error: <<NavisWorks Error - API Unlicensed>>"
So i am planning to test it in a licensed version.
Please share me the code that you have too.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>NavisWork Sample</title>
<script type="text/javascript">
function test(){
alert('called');
var state = ctrlId.state;
var find = state.ObjectFactory(state.GetEnum("eObjectType_nwO
var findspec = state.ObjectFactory(state.GetEnum("eObjectType_nwO
var findcon = state.ObjectFactory(state.GetEnum("eObjectType_nwO
findcon.SetPropertyNames("LcOaNat64AttributeValue"
findcon.SetAttributeNames("LcOpDwgEntityAttrib");
findcon.Condition = state.GetEnum("eFind_EQUAL");
findcon.value = "M/4";
findspec.Selection.SelectAll();
findspec.Conditions().add(findcon);
find.FindSpec = findspec;
var sel = find.FindAll();
state.CurrentSelection = sel;
state.ZoomInCurViewOnCurSel();
}
</script>
</head>
<body>
<input type="button" value="Click Here" onClick="test();">
<div id="canvas" style="position: absolute;top:50px; left: 0px; text-align: center; background-color: #ccc">
<object id="ADViewer" classid="clsid:99D47D37-9B2A-4EBF-8CD9-F16FFB9BF4C5" border="1"
width="1300" height="700" viewastext>
<param name="Src" value="G:\VCP\VC Test 2.nwc">
</object>
</div>
<div id="SectionList" style="position: absolute; top: 100px; left: 425px; width: 175px;
height: 400px; text-align: left; font-size: 10pt; background-color: #ccc">
List of Sections:</br></br>
</div>
</body>
</html>
Re: Is there a way to display the Naviswork viewer control in a web browser(AS P.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
My code is pretty much the same as yours.
I think that there are only limited functions you can do with the Redistributable API and a license is required for using the Integrated API. That's certainly how it appears to me, but like I said before, last week I had no idea what Navisworks was so I can't be certain.
Have you saw this thread discussing the licensed API? http://forums.autodesk.com/t5/Autodesk-Navisworks-
Re: Is there a way to display the Naviswork viewer control in a web browser(AS P.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
johncondron is correct. As the blog says: the functionalities of Redistributable control are very limited. You will need to use Integrated control to have the full abilities.
Xiaodong Liang
Developer Technical Services
Autodesk Developer Network
