« Handsfree View & Data (Voice activated) | Main | A Particle Adventure »

03/24/2016

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Ken

calling var instanceTree = model.getData().instanceTree;
returns instanceTree as undefined. strange?
(is there any better documentation than https://developer.autodesk.com/api/viewerapi/? I'm struggling to find it useful... like what is returned by getData()? all the source says is return this.myData which seems like it could be anything. Is it defined somewhere?)

Ken

Maybe this is because the file is a DWFx When I select things in the viewer I get a lot of information about them but when I look at the model browser, it appears empty.

Philippe Leefsma

Most likely you are not waiting for the following events to fire when you load your model so the instanceTree has not been loaded yet:
Autodesk.Viewing.GEOMETRY_LOADED_EVENT
Autodesk.Viewing.OBJECT_TREE_CREATED_EVENT

Take a look at this post:
http://adndevblog.typepad.com/cloud_and_mobile/2015/08/asynchronous-viewer-events-notification.html

There is no better documentation, I think that blog and the forum should address most of the topics. You can also post your questions on the forum if you are stuck, we will address them: http://forums.autodesk.com/t5/cloud-services/ct-p/94

You can simply do console.log(model.getData()) to see what is returned by this method and ultimately looking at the source code: https://autodeskviewer.com/viewers/2.5/viewer3D.js

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Your Information

(Name is required. Email address will not be displayed with the comment.)

February 2017

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28        

Autodesk Blogs

Share


Cloud and Mobile RSS Feed

Related Posts Plugin for WordPress, Blogger...