Running Creo ModelCHECK
Creo ModelCHECK is an integrated application that runs transparently within Creo+. Creo ModelCHECK uses a configurable list of company design standards and best modeling practices. You can configure Creo ModelCHECK to run interactively or automatically when you regenerate or save a model.
Methods Introduced:
You can run
Creo ModelCHECK from an external application using the method
pfcSession.BaseSession.ExecuteModelCheck. This method takes the model
Model on which you want to run
Creo ModelCHECK and instructions in the form of the object
ModelCheckInstructions as its input parameters. This object contains the following parameters:
• ConfigDir—Specifies the location of the configuration files. If this parameter is set to NULL, the default Creo ModelCHECK configuration files are used.
• Mode—Specifies the mode in which you want to run Creo ModelCHECK. The modes are:
◦ MODELCHECK_GRAPHICS—Interactive mode
◦ MODELCHECK_NO_GRAPHICS—Batch mode
• OutputDir—Specifies the location for the reports. If you set this parameter to NULL, the default Creo ModelCHECK directory, as per config_init.mc, will be used.
• ShowInBrowser—Specifies if the results report should be displayed in the Web browser.
The method
pfcModelCheck.pfcModelCheck.ModelCheckInstructions_Create creates the
ModelCheckInstructions object containing the
Creo ModelCHECK instructions described above.
The method
pfcSession.BaseSession.ExecuteModelCheck returns the results of the
Creo ModelCHECK run in the form of the
ModelCheckResults object. This object contains the following parameters:
• NumberOfErrors—Specifies the number of errors detected.
• NumberOfWarnings—Specifies the number of warnings found.
• WasModelSaved—Specifies whether the model is saved with updates.
Use the methods
pfcModelCheck.ModelCheckResults.GetNumberOfErrors,
pfcModelCheck.ModelCheckResults.GetNumberOfWarning, and
pfcModelCheck.ModelCheckResults.GetWasModelSaved to access the results obtained.