Tuesday, October 18, 2016

How to Configure the EDM Module to Ignore Uninitialized Drawing Views in the PDF Preview Rendition for Alfresco Share


One of the features of the Formtek Engineering Data Management Module (a.k.a EDM Module) is the ability to preview AutoCAD drawings in Alfresco Share. In previous EDM Module releases, you could only preview the drawing space (model or paper) that was active when the drawing was last saved. Starting with release 3.0, a multi-page PDF rendition is created that includes the model space and all available layout views. So, when you display a drawing in the Alfresco Share Document Details window, each available drawing view can be previewed as a separate page in the preview pane. For example, the drawing below is displayed as a 3-page PDF preview:

When we switch the Side Bar view to display bookmarks instead of thumbnails, you see the model space as the first page followed by two paper space layout views, Layout1 and Layout2, as the next two pages in the PDF preview:
When this drawing was first created as a new drawing in AutoCAD, the empty model space view and the two empty paper space views were created by default. However, the designer who created the drawing content only ever worked in the model space view. The layout views were never accessed, and thus, remained uninitialized in the saved drawing as you can see by the two empty thumbnails for Layout1 and Layout2 within AutoCAD:
By default, when the EDM Module creates the PDF rendition of a drawing, it automatically attempts to initialize any uninitialized layouts in the drawing and include them in the resulting PDF rendition. In the vast majority of cases, these auto-initialized layout views looks the same as if you had accessed (or initialized) the layout in AutoCAD.
I’ve you prefer not to include uninitialized layout views in the PDF rendition created by the EDM Module, your Alfresco administrator can modify the script that converts CAD drawings to PDF so that uninitialized layout views are ignored as follows:

1.      Open ALF_HOME/formtek/edm_module/bin/edm-cadtopdf.sh (on Linux) or ALF_HOME\formtek\edm_module\bin\edm-cadtopdf.bat (on Windows) for editing:
a.       Add the -nouninit parameter to the end of the following line:
               For Linux:
"${dwg_exename}" -i="${sourcename}" -o="${targetname}" -f=pdf -basic -axpath="${edmBinDir}/ax2011" -lpath="${edmBinDir}"
           For Windows: 
%dwg_exename% -i=%sourcename% -o=%targetname% -f=pdf -basic
-axpath="%edmBinDir%ax2011.exe"
For example:
"${dwg_exename}" -i="${sourcename}" -o="${targetname}" -f=pdf -basic -axpath="${edmBinDir}/ax2011" -lpath="${edmBinDir}" –nouninit

b.      Save and close the file.
Uninitialized layout views will no longer be included in any newly generated PDF renditions. For example, when this same drawing is uploaded a second time and previewed, you can see that only the model space view is available in the PDF preview:

 
Please note that any PDF rendition previously generated is stored in Alfresco along with its associated drawing and is not affected by this change unless a new version of the drawing is uploaded. Also note that the original drawing is unaffected by this change.

No comments:

Post a Comment