AnsweredAssumed Answered

Inspection "Export to Excel" macro

Question asked by Justin Logan on Nov 24, 2016

Hi,

 

As a user of the SolidWorks Inspection add-in, I have come across some additional Tasks, or macros, that would be preferred to be triggered in a workflow. Ideally, I am looking to save the final documents (ballooned PDF and Excel report) to a pre-defined location (like the Convert task allows) during a Workflow Transition.

 

I have achieved the PDF aspect using the Convert task and modifying it to include the ability to Turn On visibility, or activate, the QC Balloon layer prior to Save As... > PDF. Code attached.

 

Using the Macro > Record feature does not capture the steps taken to export to Excel.

 

The "Export to Excel" option is available in multiple ways:

  1. Tools > SOLIDWORKS Inspection > Export to Excel
  2. From the Command Manager. SOLIDWORKS Inspection Tab > Export to Excel

 

Does anyone know what code is required to perform the "Export to Excel" feature and save the file in a pre-defined location?

 

The issues I can foresee are:

  • Sometimes a re-synchronization of the characteristics is required
  • There can be multiple Excel Templates to choose from (usually only one is used, the others may be used for special cases so they can be ignored)
    • I think here you can pre-set the chosen template in the Inspection Project Template
  • Currently, the "Export to Excel" opens Excel and then the user has to save the file
    • Automating the saving from Excel would be ideal so that the file can consistently and reliably be saved to a pre-defined location

 

Any help would be greatly appreciated.

Outcomes