One of the frequently asked questions I get is "How can I use the AutoCAD 'Publish to Web' capability with Project Freewheel?" I am no Lynn Allen (a.k.a. the original Melanie Stone Perry) or Shaan Hurley, but I decided to give this a try myself and see what I could find out.
The first thing I did was create a sample drawing. I called it publish_to_web_test.dwg. Okay, I am not very original. It looked like this:
I deleted the extraneous Layout2 and used the Page Setup command to set my device as the DWF6 ePlot pc3 file.I then used the AutoCAD Publish to Web capability which was located on the file menu.
This is not the PUBLISH command that I use all the time to create DWF files. The Publish To Web capability has a Wizard type interface where you navigate through a set of simple dialogs to complete the process. It allowed me to select files, model space and/or layouts, color schemes, etc. It was easy for me even on my first try.Publish To Web is different from PUBLISH in that in addition to creating a DWF file, it also creates an HTML page that references your DWF file. After completing the steps, I had a set of files in my designated folder:
The file IM1.htm (for image one) is the key. Had I specified multiple layouts or used multiple DWG files, I would have had a set of these files - one per DWF file. This file looks like:
<!-- saved from url=(0014)about:internet -->
<html>
<body leftmargin="0" rightmargin="0" topmargin="0">
<object id="ADV" classid="clsid:A662DA7E-CCB7-4743-B71A-D817F6D575DF" width="100%" height="100%">
<param name="Src" value="IM1.dwf">
</object>
</body>
</html>
You can see that it has an HTML <object> tag which is what tells Internet Explorer to invoke Autodesk Design Review when it is encountered. That long string of hexadecimal numbers is a unique class ID for Autodesk Design Review. This is what Project Freewheel users do not want. They want visitors to their page to be able to see their design as a DWF without having to install additional software. So we need to change this file to reference Freewheel instead of using the <object> tag.The Project Freewheel server needs to be able to load your design from a location on the web. So this location needs to be specified as part of the HTML. For my example, I will be using the http://labs.blogs.com/files/ADR2FW location so I will include this in my processing. For your purposes, you will need to have a web destination in mind when you set up your own process.
I am old school. I use a set of Berkeley utilities that include a stream editing program called sed.exe. Using sed with a script that looks like:
s/%">/%"/
s/<object id="ADV"classid="clsid:A662DA7E-CCB7-4743-B71A-D817F6D575DF"/<iframe scrolling="no"/
s/<param name="Src"value="/src="http:\/\/freewheel.labs.autodesk.com\/dwf.aspx?path=http:\/\/labs.blogs.com\/ADR2FW\//
/<\/object>/d
allows me to convert the IM1.hm file in an automated way. Had I had more than one HTML file, I could have run the same script on each of the files.I ran the script on the IM1.htm file. The resulting file looks like:
<!-- saved from url=(0014)about:internet -->
<html>
<body leftmargin="0" rightmargin="0" topmargin="0">
<iframe scrolling="no" width="100%" height="100%"
src="http://freewheel.labs.autodesk.com/dwf.aspx?path=http://labs.blogs.com/ADR2FW/IM1.dwf">
</body>
</html>
Once you have your processed files, you can post the set to the web location you selected in step 5. I have posted the result to acwebpublish.htm.
So with a little bit of creative editing, which you can do manually or through your own automated process, you can publish your drawings to the web and people can view them without installing additional software. Helping users share design data is alive in the lab.

Subscribe
scottsh115
scott.sheppard
Recent Comments