Creating SOLIDWORKS Custom Report Templates

Creating SOLIDWORKS Custom Report Templates

Table of Contents


Since SOLIDWORKS Inspection was released in April of last year, the number one
topic of technical support calls has been custom report templates. Whether the
issue relates to getting attributes to map properly or making every
characteristic fit in the table, there are several tricks I have learned that
can make template creation pain free. Follow these steps on the next template
you generate for Inspection.

  1. Start by making a simple Excel workbook with the format you want in your
    report. If you want multiple pages in your report for a title page or bill
    of materials make sure to add them at this point, otherwise, delete unused
    sheets from your workbook.

Lay out your table with cell outlines, headings, color fill, and any logos you
want. There is no need to create 100 repeated characteristic rows, 5-10 should
work to give an idea of what the table will look like.

First article inspection report

  1. If you plan to use any formulas or Conditional Formatting now is a good time
    to add them. For example if you want to have your results text change color
    based on Pass/Fail criteria you would use Conditional Formatting with a rule
    checking that the result value is between the upper and lower limits.
  2. Define a footer row for each table that will be populated with a list of
    values, such as the characteristic table. This is done using the Excel Name
    Manager and allows SOLIDWORKS Inspection to expand or truncate the table to
    fit all of the items in that list, hence why we only needed a couple of rows
    in our template. For more information on how this is done take a look at the
    Hawk Ridge Systems Knowledge Base for the document Inspection Report Footer
    Rows.Name manager
  3. Once your workbook has all of the desired formatting, it’s time to save it
    as an Excel Template. There are a couple of tricks to this:

 If you plan to use both the Standalone and Add-In versions of SOLIDWORKS
Inspection, you will need to create two copies of the template since they use
different strings to map the attributes.

 “Specification” from Standalone:

iex:INSPECTIONXPERT/INSPECTION_SHEET/ATTRIBUTES/ATTRIBUTE/@Nominal

“Specification” from Add-in:

iex:INSPECTIONXPERT/SAMPLE_SHEET/CAD/ATTRIBUTES/ATTRIBUTE[@selected=’True’]/@value

 I recommend creating a folder for your custom templates outside of the
default directory. Inside this main folder create subfolders for the Add-In
and the Standalone tools. I save a copy of my report template in the
appropriate subfolder using a suffix for the version. (i.e.
HRS_FAIR_Standalone & HRS_FAIR_Add-in)

 The next import thing is the file extension you use. The SOLIDWORKS
Inspection Template Editor will only open Excel Templates (.xlt) However, if
you are using any version of Excel newer than Excel 2003 (which you should be
considering SOLIDWORKS 2014 does not officially support anything prior to
Excel 2007 and SOLIDWORKS 2015 dropped Excel 2007 as well) the default Excel
Template extension is .xltx. So you will need to use the Excel 97-2003
Template option when saving your workbook as a template.

 Inspection report add-in

  1. Now you are ready to use the SOLIDWORKS Inspection Template Editors, that’s
    right two of them. You will need to map the attributes to your templates
    using the Template Editor from the tool version you plan to use that
    template for. Meaning only use the Template Editor from the Standalone tool
    for your Standalone template and the Add-In Template Editor for that
    template.

The mapping is pretty straight forward, select the cell you want first then
select the attribute you want in there from the list and click
Insert. Some tricks here, start on the right side of your
sheet and work left. Excel lets long strings that overflow from the cell
continue over other cells that do not already have values in them therefore
you will have a hard time selecting a cell in column B if the string in column
A is covering it. Also, you only need to map one row worth of attributes in
any list, SOLIDWORKS Inspection will do the rest.

  1. When you are done mapping, click Finished. Be sure to put
    the template back in your correct folder since the Template Editor will try
    and trick you into putting it in the default location.
  2. Create or open a project to test out your new template. Choose
    Export to Excel, then click the green plus sign to add your
    new template to the list.Export to Excel

The list of templates is saved with the project, so if you want that template
to always be an option without adding it each time you need to update the
Project Template you use to include your custom Report Template. Click
Export.

Bask in all your hard work, you have created a custom template for Inspection
reports!

This might seem like a lot to condense into a short blog, so I made a video as
well, actually three. Take a look at the Hawk Ridge Systems YouTube channel
for the three part video series on creating SOLIDWORKS Inspection report
templates where I walk you through these steps and show you how it’s done.

 

Tyler Braginton

Tyler Braginton

Applications Engineer Tyler Braginton hails from our Reno, NV office, and is a Certified SolidWorks Professional who teaches a variety of introductory and advanced classes across Northern California and Nevada. Tyler holds a B.S. in Mechanical Engineering from the University of Nevada-Reno, and is an expert in SolidWorks, SolidWorks Electrical, and CAMWorks. When he isn't modeling parts or teaching classes, you can probably find Tyler at a Tough Mudder competition or on his snowboard in Tahoe.
0 0 votes
Article Rating
Subscribe
Notify of
guest

2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Marc Trumpi
Marc Trumpi
2 years ago

Dear Tyler,

I found your post regarding mapping attributes to an Inspection template. Do you perhaps also know how to map Custom Properties from a model to the sheet? The output from the template editor doesn’t work and our VAR can’t find an answer either.
Thanks.

Best regards,
Marc Trumpi

Scott Woods
Scott Woods
2 years ago

Hi Marc,

This Scott, I will be filling in for Tyler. He is on the road to one of our Design to Manufacturing conferences.
In order to pull custom properties from a part and push that all the way to the final Excel output takes a couple of steps.
1: Add the custom property to the part, note the exact spelling of the property name as it will need to be identical in the template in order to make the connection.
2: From the SOLIDWORKS Inspection add-in, start a new Inspection project, under General Settings > Custom Properties select Add.
3: A new field under Custom Properties will pop up, type in the value of the custom property that was added to the part.
4: Under Value click on the + sign and select the “custom property from model” from the pop-up window.
5: Start the Template Editor (SOLIDWORKS Inspection > Launch Template Editor)
6: From the Template Editor select the cell you want to place the custom property. At the top of the Token window is “Custom Property From Model”, this field is where you type in the custom property from the SOLIDWORKS part. This spelling is critical, I suggest a copy-paste from the custom property so that there are no spelling errors.
7: This template now needs to be saved and then added to the export template list. To do so select Export to Exel and then select the Add button in the Exporting window.
8: Add the template you just made and export it.

This should add the custom property from the model to the final inspection report.
Let me know how it turns out.

Scott Woods