Archive for the ‘modelCHECK’ Category

Model Check batch file

Tuesday, October 27th, 2009

Saving this for my reference - A batch file that I used to run ModelCheck outside of Pro/E.

It creates a list of the files (parts.lst) in a directory. The list is progressive, starting with .prt, then .asm, and finally .drw.

It deletes the original (*.1) files (from the backup) so I know there’s no reason to check them in or add them back to my workspace.

The %1 is for a shortcut startup directory.

Some optional ideas are commented out, like the purge at the end.

cd /d %1
echo modelcheck_enabled yes > config.pro
if exist parts.lst del parts.lst
dir *.prt.* *.asm.* *.drw.* /b > parts.lst
set path=d:\ptc\wf2\bin;d:\batch
pause
call modelcheck.bat pro25.bat -f parts.lst
pause
rem c:\windows\system32\notepad.exe std.out
rem cleanup.bat %1
rem del *.prt.1 *.asm.1 *.drw.1 *.frm.* trail.txt.* config.pro mc_run*
rem purge

Things you might do differently:

  • Copy a different config.pro into this directory. I never really bothered checking out the no_graphics option.
  • Open the error log (mc_err.log), but the std.out echoes all the changes made during the run.
  • Open the .html results?
  • Purge and copy all *.prt.*, *.asm.*, and *.drw.* files to a clean directory.

Once again, I’m reminded how nice it is to have a decent text editor like TextPad available on my context menu ready and willing to open any file type.

Pro/E Tip (mcheck): ModelCHECK sheetmetal thickness check

Sunday, February 11th, 2007

This is a fairly easy one. The only trick is linking the thickness file to the start file. Once again, let’s run through the files one by one:

  1. Check file (*.mch) – add
    SHTMTL_THICK  YNEW  W  W  W  W  W
  2. Start file (*.mcs) – add
    STD_SHTMTL_THICK_FILE text\thick.txt
  3. Info file (*.txt) – create in the text directory
    # ModelCHECK Standard Sheet Metal Thicknesses File
    #
    UNIT INCH
    .036
    .048
    .060
    etc
    UNIT MM
    .91
    1.21
    1.52
    etc

Small problem: there’s no way to separate tables by material types.

Pro/E Tip (mcheck): Check drawing formats

Saturday, October 21st, 2006

Format names can be checked against a standard list. Once again, three files need to be in synch: the check file, the start file, and an external (info) file. Try this:

Check file (*.mch)
FORMAT_NAME YNEW W W W W W

Start file (*.mcs)
STD_DRW_INFO_FILE text/formats.txt

Info file (*.txt)
DRW_FORMAT Asomething
DRW_FORMAT Bsomething
DRW_FORMAT Csomething
...

Hint: “dir /b > formats.txt” will get you started on your format list

Pro/E Tip (mcheck): Add a .dtl file check

Saturday, October 21st, 2006

Adding a check against your standard detail file can be accomplished pretty easily in ModelCHECK. I like to check for independent layers, as well as any recent changes to the standard detail file.

As always, it requires a coordinated effort between the check file, start file, and support files. In this case, modify the following files:

Check file (*.mch)
STD_DTL_SETUP YNEW W W W W W

Start file (*.mcs)
#STD_DRW_DTL_FILE B text/dtl/b.dtl
#STD_DRW_DTL_FILE C text/dtl/c.dtl
#STD_DRW_DTL_FILE D text/dtl/d.dtl
STD_DRW_DTL_FILE DEFAULT text/dtl/in.dtl

Abbreviated detail file (*.dtl)
draw_layer_overrides_model yes
ignore_model_layer_status yes

NOTES:

  • The check file condition flags are explained on the ModelCHECK page
  • The STD_DRW_DTL_FILE format specifies a format size and detail file
  • There is also a DEFAULT detail file option
  • The .dtl file location could be a company standard or a special ModelCHECK file
  • There is a mechanism to update the detail file, but it’s busted right now (see KB)

I always use ‘/’ in paths because ‘\’ isn’t always acceptable (need ‘\\’). Full paths are recommended, but in this case ‘text’ is the ModelCHECK config/text directory.

KB References:

Pro/E Tip (mcheck): External Lists

Wednesday, August 2nd, 2006

Checks with multiple options can refer to a list defined outside the config files. For example, here’s a list of designers that can be checked against a parameter called “designer” in the default start part (default.mcs).

BASHFUL
DOC
DOPEY
GRUMPY
HAPPY
SLEEPY
SNEEZY 

Start with this instruction in your start part file:
   PRT_PARAMETER DESIGNER STR EQ LIST_DESIGNERS

This says check parts for a string parameter called ”designer” against a “list” of designers. You could include this list in the start part like this:
   LIST_DESIGNERS BASHFUL
   LIST_DESIGNERS DOC
   etc.

Or, you could create a simple text file that can be updated quickly. Do that by adding:
   STD_USER_LIST_FILE text\designers.txt

This is how ModelCHECK links to an external file. “DESIGNERS” is the link. “DESIGNERS” defines the file name. Any path is relative to the ModelCHECK config location, in either the default location, or set by the environment variable $MCDIR.

Finally, the designers.txt file should follow the format of the start part :

LIST_DESIGNERS BASHFUL
LIST_DESIGNERS DOC
LIST_DESIGNERS DOPEY
LIST_DESIGNERS GRUMPY
LIST_DESIGNERS HAPPY
LIST_DESIGNERS SLEEPY
LIST_DESIGNERS SNEEZY

It’s pretty easy to start with an internal list and migrate to an external list later. Besides parameters, you can list model names (with wildcards, I believe), mass units, and others.

I’ve included a designer list in the Sample ModelCHECK config files.

Pro/E Tip (model): Units and materials

Thursday, July 27th, 2006

If you work in metric units, which unit system do you use: millimeter Kilogram Sec (mmKs) or millimeter Newton Second (mmNs)? When you run Model Analysis, which units of mass do you get: tonnes or kilograms?

Answer: mmNs gives mass results in tonnes, mmKs gives results in kilograms – much friendlier. Mechanica users may not be happy doing force unit conversions , but the tradeoff seems to favor everyday Pro/E users.

Model check help:
in check (.mch) file:
! units check
UNITS_MASS YNEW W W W W W
! material check
MATERIAL_INFO YNEW W W W W W
in start (.mcs) file:
# flag tonnes
PRT_UNITS_MASS KILOGRAM
PRT_UNITS_MASS POUND
# allowable materials (could be separate list)
MATERIAL_NAME STEEL
MATERIAL_NAME ALUMINUM

Mapkey help:
! convert units to mmKs
mapkey kg ~ Activate `main_dlg_cur` `Edit.pshSetup`;#UNITS;\
~ Select `um_finder` `SystemsFinderList`1 `sysunits7`;\
~ Activate `um_finder` `PrincipalPush`;~ Activate `um_sys_conv_new` `OKStd`;\
~ Activate `um_finder` `ClosePush`;

Pro/E Tip (model): Short edge checks

Tuesday, May 23rd, 2006

Analysis > Model Analysis > Short Edge.

Short edges are a pretty good indicator of model quality. Too many short edges can also mean that an increase in accuracy is required.

Start a short edge analysis by entering a very small absolute value in the “Edge Length” definition, and Pro/E will give you a range of absolute values for short edges based on accuracy. The minimum value is about one-third the predicted minimum based on relative accuracy and model size.

Caveat reader: I need to refine this discussion with better examples, but I wanted to start a thread with this idea.

PTC Knowledge Base:
When the SHORT_EDGE Option Is Set To CALCULATE in the ModelCHECK Constant File the Short Edge Value Does Not Change Depdending On Model Size

Pro/E Tip (mcheck): Avoid (*,$,#,?) for parameter defaults

Wednesday, May 17th, 2006

These characters are wildcards in ModelCHECK and can’t be escaped (AFAIK) in condition statements, so it’s very hard to check for parameters with default values. Save yourself trouble downstream: try “-”.

Pro/E Tip (model): Default layers

Saturday, May 13th, 2006

The goal is to display a model free of annotation and unencumbered by construction features.

Items to be controlled with default layers: planes, axes, points, curves, coords, surfaces, cosmetics, threads, gtols. Items to be controlled with ad hoc ayers: merges, mirrors, imports. Don’t use layers to control component visibility; use simplified reps instead.

Less is more, definitely, when it comes to default layers.

ModelCHECK: (requires PRT_LAYER and ASM_LAYER start configs)

LAYER_PLACE YNEW W
LAYER_STATUS YNEW W

def_layer layer_axis axes
def_layer layer_csys coords
def_layer layer_cosm_sketch cosmetics
def_layer layer_curve curves
def_layer layer_gtol gtols
def_layer layer_datum planes
def_layer layer_point points
def_layer layer_surface surfaces
def_layer layer_thread_features threads

Pro/E Tip (models): Never store models in insert mode or with suppressed features

Friday, May 12th, 2006

This would be hazardous to the next user’s health. Consider whether you should create a family table for suppressed features.

ModelCHECK:

INSERT_MODE YNEW E
SUP_FEATURES YNEW E