by Fenton Webb
New in AutoCAD 2012 is the HTML help system (no more CHM). That said, contrary to what the OEM Developers Guide implies, in AutoCAD OEM, CHM’s are still required.
Here’s how to build your AutoCAD OEM 2012/2013 CHM from the supplied HTML source files.
You will first need to download and install Microsoft HTML Help
I’m going to use my OEM2013 install, but it should be the same in OEM 2012 also.
Where I mention OEM2013, I mean C:\Program Files\Autodesk\OEM2013
Step 1: Create default .hhp file
Using a text editor, create a new .hhp file called MyOEMProduct.hhp and save it to the OEM2013\Help folder. The contents of this file should be as follows, edit the fields in the text file as you need:
[OPTIONS]
Auto TOC=9
Compatibility=1.1 or later
Compiled file=aoem.chm
Default Window=TriPane
Default topic=files\homepage.htm
Display compile progress=Yes Error log file=log.log
Full-text search=Yes
Language=0x409 English (United States)
[WINDOWS]
TriPane="AutoCAD Whatever",,,,"files\homepage.htm",,,,,0xe3520,255,0x304e,[0,0,800,600],,,,,,,0
[FILES]
index.html
Step 2: Copy the context help .htm files to the OEM2013\Help folder
Move or copy all the files from the OEM2013\Help\ConextHelp subfolder to the OEM2013\Help folder.
Step 3: Repair the relative paths in the htm files
Next, recursively replace all *.htm files which have the text
.replace(‘../files
with
.replace(‘./files
Step 4: Update the Java Script so it does nothing
Edit common-processing.js so that the initFrame() just returns or comment out the entire function…
e.g.
function initFrame(url,topicNumber,index,hash)
{
return; // just return and do nothing
if (top == self) {
var hashWithoutSharp;
if (hash !== undefined) {
hashWithoutSharp = hash.substring(1);
}
window.location.replace('../' + index + '?url=' + url + ',topicNumber=' + topicNumber + ((hashWithoutSharp) ? ',hash=' + hashWithoutSharp : ''));
}
}
Step 5: Load your .hhc into HTML Help
Using HTML Help, load your MyOEMProduct.hhc into HTML Help. Be careful about permissions to the OEM2013\Help folder, if needed, change the owner of Program Files to be yourself (with full permissions) otherwise HTML Help may not be able to save.
Step 6: Add all help files to the HTML Help Project
In DOS, create an hhp file by redirecting the file listing from DIR to a hhp file… e.g.
dir *.htm /B /S /R >> MyOEMProduct.hhp
dir style /B /S /R >> MyOEMProduct.hhp
dir scripts /B /S /R >> MyOEMProduct.hhp
dir images /B /S /R >> MyOEMProduct.hhp
dir html /B /S /R >> MyOEMProduct.hhp
dir files /B /S /R >> MyOEMProduct.hhp
Step 7: Save the HTML Project and quit HTML Help.
Step 8: Edit style\acad.css to remove broken banners
To get rid of the broken buttons in the banner, in style\acad.css make the following changes.
Change
.headNavLinkShare {
margin: 35px -18px 0 -18px;
position:absolute;
}
To
.headNavLinkShare {
display: none;
}
Change
.headNavLinkAddToFav {
margin: 35px -47px 0 -47px;
position:absolute;
}
To
.headNavLinkAddToFav {
display: none;
}
Change
.headNavLinkHome {
margin: 35px -76px 0 -76px;
position:absolute;
}
To
.headNavLinkHome {
display: none;
}
Step 9: Create the Table of Contents (Optional)
Normal AutoCAD does not have a Table Of Contents, but you can create your own if you want. Doing this will require substantial work to implement it correctly, so this is optional.
In HTML Help, simply click on the ‘Contents’ tab to create a TOC.
Step 10: Build the CHM using HTML Help
Reload your MyOEMProduct.hhc into HTML Help and then hit the Generate button
Step 11: Sit back
…watch as HTML Help generates the CHM file you!
If you have any high quality cigars to hand, you may want to use this time to select one from the box, clip the end off using your favourite cigar clipper, light up then place your alligator skin boots on the table in front of you to enjoy.