CheckReleasedStructuresIntegrity

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Commands Reference > PDMSystem >

CheckReleasedStructuresIntegrity

available from build: 20070831

Description

The command checks for released structures (typically released assemblies) and compares the structure contained in the .TREE file (file generated automatically at approval time) with the current PARENT_CHILD structure, allowing to find out possible errors in the PARENT_CHILD table.

Of course, the .TREE files must be available for the documents to be checked.

The command writes a LOG: %TMP%\DBWCheckReleasedStructuresIntegrity.LOG

If any structure is detected as invalid, a message box is displayed asking if the user wants to apply the structure contained in the .TREE files to each document with the wrong structure.

Syntax

call DBWShell("CheckReleasedStructuresIntegrity [optionalSQLfilter]")

Parameters

optionalSQLfilter

It is the condition for the documents to be processed by the command If this argument is not passed, CheckReleasedStructuresIntegrity scans every released assembly.

Remarks

This command can be used only from DBWorks Administrators

Any "fake" quantity will no more be highlighted after the process, even if the quantity itself will be exactly the one defined in the .TREE file

CheckReleasedStructuresIntegrity1
Initial situation

CheckReleasedStructuresIntegrity2
After the corruption

CheckReleasedStructuresIntegrity3
After repaired

Example

Sub Main()

 DBWInit(TRUE)
 DBWShell("CheckReleasedStructuresIntegrity")
End Sub

Sub Main()

 DBWInit(TRUE)
 filterCondition = "T='A' AND STATE='RELEASED' AND UNIQUE_ID=100071803"
 DBWShell("CheckReleasedStructuresIntegrity " & replace(filterCondition," ","|"))
End Sub