Hide Table of Contents

Custom Check

Writing Macros

Use SolidWorks macros to perform custom Design Checker validations. Create a macro, then register it with the Design Checker.

To create a macro, click Tools > Macro > New . The macro procedure cannot have arguments. Call SetCustomCheckResult in the Design Checker API to indicate what to show on the result page, passing one of the following values:
  • true - the check passes
  • false - the check fails
Read about Custom Check in the Design Checker API Help for information about Design Checker objects and methods.

Registering Macros

Register the macro in the Custom Checks dialog box in the Build Checks application:

Name Assign a name to the validation check.
Macro File Path Path to the file containing the macro. Click to browse to the file.
Module Name.Procedure Name Select the macro name, for example, custom_check1.main
Applicable SW Document Select the type of document to validate, one of drawings, parts, or assemblies.

Storing Macros

Custom check macros are stored with the standards file to make it easier to distribute the correct combination of standards and macros to multiple users.

  • When you save a standards file that includes a custom check, the associated macro is saved with that standards file.
  • To use an updated macro, go to the Document's Custom Check window where you added the macro. Reselect the Macro File Path and the Module Name.Procedure Name.


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Custom Check
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:



x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: SOLIDWORKS 2013 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.