What is Autodesk Freewheel?

Autodesk Freewheel is an Ajax (Asynchronous JavaScript and XML) based web service/application built to provide CAD model viewing, printing and collaboration, through the dynamic rendering of DWF file data and graphics information. You can think of Freewheel as a set of componentized Web Services and JavaScript frameworks. Together these components make up the Interactive Ajax DWF Viewer.

What can you do with Freewheel?

Embed it into your website
Display interactive 2D and 3D CAD designs without requiring your visitors to download special viewing software.

To allow people to view your DWF file inside your own web page, you first need to make your DWF file available publicly on the internet (it must have a public URL so that the Autodesk server can retrieve the DWF file and render it). Then all you need to do is add the following to your HTML source code in the appropriate location (depending upon where in your web page you want the viewing service to appear):

<iframe scrolling="no" width="800" height="600"
src="http://freewheel.autodesk.com/dwf.aspx?path=http://freewheel.autodesk.com/sample/Hotel5.dwf">
</iframe>

You can edit the red text to specify your desired viewer window size and DWF URL respectively.

More Details:

This is an interactive viewer including a GUI. You can place hyperlinks on objects on your own HTML page and jump to the full-screen viewer from them. Alternatively you can embed this viewer service directly in your own HTML pages using an <IFRAME> or <FRAME> tag (as shown above). This page takes the following parameters:

  • &path=<string> An URL path to a DWF to be viewed.
  • &sec=<integer> An integer from 1 to "N" for the section number (also known as page number) to view. Default: 1
Example: The following URL would start the interactive viewer with minimal parameters:
http://freewheel.autodesk.com/dwf.aspx?path=http://freewheel.autodesk.com/sample/Hotel5.dwf&sec=1
When viewing 2D sections, the following additional parameters are available:
  • &cx=<float> A number from 0.0 to 1.0 for the view's Center in X. Default: 0.5
  • &cy=<float> A number from 0.0 to 1.0 for the view's Center in Y. Default: 0.5
  • &scale=<float> A number in the range 1.0 to 16384.0 for the view's Scale. Default: 1.0
Example: The following URL would start the interactive viewer looking at the 8th page (or section) of the DWF file "Hotel5.dwf". The scale of 2.0 means that the dwf will be zoomed in 2x. The cx and cy define the center point for the zoom.
http://freewheel.autodesk.com/dwf.aspx?cx=0.47&cy=0.3&scale=2.0&sec=8&path=http://freewheel.autodesk.com/sample/Hotel5.dwf
When viewing 3D sections, the following additional parameters are available:
  • &px=<float> A number setting the camera positions X value.
  • &py=<float> A number setting the camera positions Y value.
  • &pz=<float> A number setting the camera positions Z value.
  • &tx=<float> A number setting the camera target positions X value.
  • &ty=<float> A number setting the camera target positions Y value.
  • &tz=<float> A number setting the camera target positions Z value.
  • &ux=<float> A number setting the camera up positions X value.
  • &uy=<float> A number setting the camera up positions Y value.
  • &uz=<float> A number setting the camera up positions Z value.
  • &fy=<float> A number setting the camera focus X value.
  • &fz=<float> A number setting the camera focus Y value.
  • &proj=<string> A string setting the camera's projection value (proj or orth).
  • &q=<string> A string setting the image quality, valid parameters are "low" or "high".

If the above values are not specified when requesting a image, the default camera position within the 3D section will be used.

Leverage the CAD model graphics rendering Service
Quickly convert DWF files to images. Use the "Render-this-link" bookmarklet to convert all DWF files on your web page to thumbnail preview images (rendered on the fly).

This is web service which renders DWF file graphics sections as raster images dynamically on the fly. This service is used for displaying and printing the graphical sections of a DWF file. This is a raw rendering service that provides no GUI. The service accepts an URL to a DWF, view parameters, and returns a rendered image file. You can build your own interactive or multi-platform viewer from this service. The "dwf.aspx" service above uses this service internally to produce the various views.

The DWF-to-image rendering service takes the same parameters as the interactive service, along with the following additions:
  • &width=<integer> The horizontal size of the image to produce (in pixels).
  • &height=<integer> The vertical size of the image to produce (in pixels).
The width and height parameters must be evenly divisible by 2.

Example 1: The following URL starts the rendering service, providing with a close up view of the front of the model "Supension.dwf".
http://freewheel.autodesk.com/DWFImage.aspx?path=http://freewheel.autodesk.com/sample/CompositeSuspension.dwf&page=2&width=600&height=300

Example Resulting Image:

Example 2: the following URL will render a image small enough to fit on most cell phone screens. It will view the center of page 3 of the Hotel5 zoomed in to a factor of 4 and generate a image that is 200x200 pixels:
http://freewheel.autodesk.com/dwfImage.aspx?cx=0.5&cy=0.5&scale=2&sec=2&width=200&height=200&path=http://freewheel.autodesk.com/sample/Hotel5.dwf

Example Resulting Image:

Utilize the CAD model meta-data rendering service
Render certain types of meta data within the DWF file to XML. Use methods on the service to determine the number of pages in a DWF, the page names, and other information.

The DWFRender.asmx web service (via SOAP protocol) returns information about a specified DWF, rendering certain types of meta data within the DWF file to XML. You can use methods on the service to determine the number of pages in a DWF, the page names, and other information. The following URL provides additional SOAP interface and WSDL documentation: http://freewheel.autodesk.com/dwfRender.asmx

There you will find the following SOAP methods:

defaultCamera - Gets the Default Camera for 3D DWF files load - Displays DWF section information and metadata pdkVersion - Gets the current PDK Toolkit version used by the DWFRender.asmx web service sectionCount - Returns the entire number of sections within the DWF file

Examples are provided as part of the documentation: http://freewheel.autodesk.com/dwfRender.asmx

Sample Code: Add thumbnail images to DWF links

Instead of using plain text to link to DWF files, use this javascript code snippet to automatically generate thumbnail images (which, when clicked, will open the design in the Freewheel viewer). Just add this code to your catalog pages and you'll immediately get rendered images. Learn more.

This simple Autodesk Freewheel javascript code snippet automatically renders thumbnail images of DWF designs on your web page.

<!-- COPY & PASTE THE CODE BELOW AT THE END OF YOUR HTML BODY, JUST ABOVE THE END TAG -->
<!-- BEGIN COPY SCRIPT SNIPPET -->

<script>

function DWFLinksToThumbnails() {

// Define URL for interactive Freewheel DWF Viewer web service
renderDWF='http://freewheel.autodesk.com/dwf_s.aspx\?dwf=';

// Specify thumbnail width/height
thWidth = '400';
thHeight = '400';

// Define URL for Freewheel DWF to PNG service - this is used to dynamically render DWF links as PNG images
th1='http://freewheel.autodesk.com/dwfImage.aspx\?width='+thWidth+'\&height='+thHeight+'\&path=';

// Iterate through all hyperlinks in the document

for(i=0;i x=document.links[i];

// Filter URLs - check if links are to DWF files
if(x.href.match(/\.dwf$|\.DWF$/)&&x.href.match(/^http:\/\//)&&!x.href.match(/\=http|google\.com/))

// Modify the orig link urls to be Freewheel enabled urls with orig dwf url used as parameter on the DWF to PNG webservice url and the interactive Freewheel viewing web service.
// Use the browser DOM to modify the original content of the DWF hyperlinks

{x.title='Click to view: '+x.href;x.innerHTML=x.innerHTML+'
';
g=renderDWF+x.href;
x.href=g;
x.target = "_blank";
}
}
}

// Run the DWFit Freewheel javascriptlet
// NOTE: This function call should be placed at the very bottom of the HTML code, just above the </Body> tag
DWFLinksToThumbnails();
</script>

<!-- END COPY SCRIPT SNIPPET -->

See it in action:

Sample Code: Mash Up Freewheel with Google Maps

Embed Autodesk Freewheel within your KML file to display CAD data within online maps. Set pointers for important assets, display the rendered images within the pop-up, and open designs using the Freewheel service. Learn more.

The Google™ Maps API contains detailed documentation on how to customize the Google Maps application. With the sample KML file below, you can embed Freewheel-rendered images of designs within the pointer popup.

<!-- COPY & PASTE THE CODE BELOW INTO A BLANK TEXT FILE, SAVE IT AS A KML FILE -->
<!-- BEGIN COPY SCRIPT SNIPPET -->

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">

    <Document>

      <name>Freewheel-based Parcel Maps </name>
      <visibility>0</visibility>
      <description><![CDATA[Click placemarks for image of parcel map. Click popup parcel map for the full DWF file, opened within Autodesk Freewheel]]></description>
      <Folder>
        <!-- :::: LOCATION ....................... [ 1 ] -->
          <Placemark>
            <name><bold>Truckee River - Reno, NV</bold></name>
              <description>
              <![CDATA[
                <p><small>Click image for interactive map</small><br>
                <a href="http://freewheel.autodesk.com/dwf_S.aspx?dwf=http%3a%2f%2fwater.nv.gov%2fscans%2fDWF%2fTR-048.dwf"><img src="http://freewheel.autodesk.com/dwfImage.aspx?cx=0.5&cy=0.5&scale=2&sec=1&width=200&height=200&path=http%3a%2f%2fwater.nv.gov%2fscans%2fDWF%2fTR-048.dwf" border="1"></a></p>
                ]]>
              </description>

            <Point>
              <coordinates>-119.775867,39.512252</coordinates>
            </Point>
          </Placemark>

        <!-- :::: LOCATION ....................... [ 2 ] -->

        <Placemark>
          <name><bold>Columbia River - West Richland, WA</bold></name>
            <description>
            <![CDATA[
            <p><small>Click image for interactive map</small><br>
            <a href="http://freewheel.autodesk.com/dwf_S.aspx?dwf=http%3a%2f%2fwww.co.benton.wa.us%2fmap4.5.dwf"><img src="http://freewheel.autodesk.com/dwfImage.aspx?cx=0.5&cy=0.5&scale=2&sec=1&width=200&height=200&path=http%3a%2f%2fwww.co.benton.wa.us%2fmap4.5.dwf" border="1"></a></p>
            ]]></description>

          <Point>
            <coordinates>-119.354417,46.292085</coordinates>
          </Point>
        </Placemark>
      </Folder>
    </Document>
</kml>
<!-- END COPY SCRIPT SNIPPET -->

See it in action: Google Maps mashup




What is Project Freewheel?

Project Freewheel, available on Autodesk Labs, is a tech preview of upcoming functionality we're working on for the Autodesk Freewheel product. At times, it will have identical functionality as the Autodesk Freewheel product. But other times, it may look or work differently. If you have thoughts or requests for new functionality, be sure to drop us a note on the Autodesk Freewheel discussion boards.