Design Review
Welcome to Autodesk’s Design Review Forums. Share your knowledge, ask questions, and explore popular Design Review topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DWF Viewer Javascript API

7 REPLIES 7
Reply
Message 1 of 8
tagbagz
5542 Views, 7 Replies

DWF Viewer Javascript API

There are a few examples of javascript code on the net for controlling the DWF viewer when embedded in a webapage. Is there a comprehensive guide to all available functionality.

I am looking for a way to make the Selection be turned on by default (or a method of controlling with javascript) without having to either select the arrow from the toolbar or use the right click menu.

 

Also does anyone know of a way to change the object params using javascript, I have tried modifying them with the DOM but it appears that once the dwf object is loaded the params cannot be changed without a complete page refresh.

 

Any help greatly appreciated

 

Paul M

7 REPLIES 7
Message 2 of 8
tagbagz
in reply to: tagbagz

Its OK I have found the solution by trial and error.

 

I would like to know however if there is a way in which the current selected object in the dwf viewer can be deselected using javascript, because selecting the currently  selected object does not  cause an event to fire

   

Thanks

PM

Message 3 of 8
tagbagz
in reply to: tagbagz

I have managed to find a solution to the above also.

What I would really like to know is if the properties palettes can be disabled so they do not pop up (if the user has them turned on)  when an object is clicked on.

I have tried various permutations of:

 

ADViewer.ECompositeViewer.Commands('OBJECTPROPERTIESBAND').Enabled = false;

but this does not seem to work

 

any help greatly apprecciated

 

PM

Message 4 of 8
vgottipa
in reply to: tagbagz

Try setting AdViewer.AutoOpenPalettesDisabled = 1

Message 5 of 8
tagbagz
in reply to: vgottipa

Many thanks that works great on the latest plug-in

does anyone know why the design review plug-in that gets downloaded from the Autodesk Website is the 2009 version?

 

is there a CAB file in existence anywhere for the 2012 or 2013 browser plug-in (the full design review download that includes the plug-in is over 700MB in size)

 

regards

Paul M

Message 6 of 8
BrunoMeier7845
in reply to: tagbagz

Can you Post the Solution, have the Same Quentin, how to change properties with the API. Thanks

 

Message 7 of 8
BrunoMeier7845
in reply to: tagbagz

Can you Post the Ideal, how to deselect all selected Objekts in the viewer. I can Not find any Event for that. Tanks 

Message 8 of 8
mmemma
in reply to: BrunoMeier7845

There is this: http://through-the-interface.typepad.com/through_the_interface/2014/05/javascript-in-autocad-viewing...

 

but it's through Autocad, if you want something like freewheel used to be, use the 360 api? Which I do't think is out yet, but I'm assuming it works something like freewheel used to, tech preview: https://autodesk360.com/

 

using an iframe:

 

<iframe scrolling="no" frameborder="0" hspace="0" src="https://360.autodesk.com/Public/Embed?hash=be253600ed6e4b4089526e8436478836" width="430" height="619" allowtransparency="true" style="border: medium none;"></iframe>

 Personally I would use an <object> with an iframe fallback:

 

<!--[if !IE]>-->
   <object data="https://360.autodesk.com/Public/Embed?hash=be253600ed6e4b4089526e8436478836" type="text/html" style="width:100%;height:50em;" class="model">
      <p>Sorry. This content cannot be rendered (non-IE object).  Stop living in the past and upgrade to <a href="http://www.abetterbrowser.com">a better browser</a></p>
   </object>
<!--<![endif]-->

<!--[if IE]>
  <iframe src="https://360.autodesk.com/Public/Embed?hash=be253600ed6e4b4089526e8436478836" type="text/html" style="width:100%;height:50em;" class="model">
     <p>Sorry. This content cannot be rendered (IE iframe).  Stop living in the past and upgrade to <a href="http://www.abetterbrowser.com">a better browser</a></p>
  </iframe>
<![endif]-->

 

the endgame woulde be if you could include 

 

<script src="http://code.jquery.com/jquery-1.7.1.js"></script>
    <script src="js/three.min.js"></script>
    <script src="js/controls/TrackballControls.js"></script>
    <script
      src="http://app.autocad360.com/jsapi/v2/Autodesk.AutoCAD.js">
    </script>
    <script src="js/acadext.js"></script>
    <script src="js/threesolids.js"></script>

 on your own webpage and embed a div to view a model like

 

<div class="modelviewer"><object data="mysite/myfolder.model.dwf" type="text/html" style="width:100%;height:50em;" class="model">
   </object></div>

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report