Engineering Subroutines
PDM/XREF - engineering data management and cross-references
Subroutine count: 7
Table of Contents
VB_PDM.REV1
Signature: SUBROUTINE VB_PDM(CO,REQTYPE,PDMID,P1287REC,ADDFLAG,MESSAGE)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_PDM.REV1
| Property | Value |
|---|---|
| Status | [X] deprecated |
| Args | 6 |
| Superseded By | VB_PDM.REV2 |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | |
| 1 | REQTYPE | in | |
| 2 | PDMID | in | |
| 3 | P1287REC | out | |
| 4 | ADDFLAG | in | |
| 5 | MESSAGE | out |
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_PDM.REV1",
"args": {
"0": "",
"1": "",
"2": "",
"4": ""
}
}VB_PDM.REV2
Signature: SUBROUTINE VB_PDM(REQTYPE,PDMID,NEWPDMREC,ADDFLAG,MESSAGE)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_PDM.REV2
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [COND] conditional |
| Pattern | CRUD |
| Args | 5 |
| Description | Manages PDM (Product Data Management) records with support for checkin, checkout, sync, release, and delete operations. Updates the PDM.1287 master file and maintains PDMXREF.1287 cross-reference records per employee. |
| Dangerous REQTYPE | CHECKIN, CHECKOUT, SYNC, RELEASE, DELETE |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | REQTYPE | in | Request type: CHECKIN, CHECKOUT, SYNC, RELEASE, or DELETE |
| 1 | PDMID | in | PDM document identifier (e.g. ‘000001.SLDPRT’) |
| 2 | NEWPDMREC | inout | PDM record data; on input contains new field values for checkin/checkout/sync; not used as output |
| 3 | ADDFLAG | in | Add flag: ‘Y’ if creating a new PDM record (used by CHECKIN and SYNC) |
| 4 | MESSAGE | out | Status/error message (e.g. ‘LOCKED’, ‘DELETE SUCCEEDED’) |
Tables Referenced: EMPLOYEE.ACCESS.1287
Tables Written: PDM.1287, PDMXREF.1287
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_PDM.REV2",
"args": {
"0": "",
"1": "",
"3": ""
}
}VB_PDM.TRANS
Signature: SUBROUTINE PDM.TRANS(INREC,OUTREC,MESSAGE)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_PDM.TRANS
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [SAFE] safe |
| Pattern | Inquiry |
| Args | 3 |
| Description | Retrieves PDM document information for a list of IDs. Supports local, checked-out, and vault views; resolves SolidWorks file extensions and traverses reference hierarchies to build a complete document list with metadata. |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | INREC | in | Input parameters: <1>=value-marked list of PDM IDs, <2>=transaction type (I=inquiry, O=checkout, S=sync) |
| 1 | OUTREC | out | Output array of PDM record fields for each resolved document (filename, description, extension, paths, checkout info, timestamps, version, MRP, GT code) |
| 2 | MESSAGE | out | Error message if PDM record does not exist or process is aborted |
Tables Referenced: PDM.1287, PDMXREF.1287, EMPLOYEE.ACCESS.1287
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_PDM.TRANS",
"args": {
"0": ""
}
}VB_XREF.ADD
Signature: SUBROUTINE XREF.ADD(CO,PARTNO,REF,TYPE,MSG)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_XREF.ADD
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | Process |
| Args | 5 |
| Description | Adds a cross-reference entry to PRODXREF, REFXPROD, and XREFINDEX tables. For MFG type references, also updates the manufacturing code in ITEMMANF. Inserts are sorted by ascending reference and descending part number. |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | PARTNO | in | Part number to cross-reference |
| 2 | REF | in | Cross-reference code (e.g. vendor part number, manufacturer code) |
| 3 | TYPE | in | Cross-reference type (e.g. ‘MFG’ for manufacturer) |
| 4 | MSG | out | Error message (initialized to empty) |
Tables Written: PRODXREF, REFXPROD, XREFINDEX, ITEMMANF
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_XREF.ADD",
"args": {
"0": "",
"1": "",
"2": "",
"3": ""
}
}VB_XREF.DEL
Signature: SUBROUTINE XREF.DEL(CO,PARTNO,REF,TYPE,MSG)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_XREF.DEL
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | Process |
| Args | 5 |
| Description | Deletes a cross-reference entry from PRODXREF, REFXPROD, and XREFINDEX tables. For MFG type references, also clears the manufacturing code in ITEMMANF. Deletes entire records when they become empty. |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | PARTNO | in | Part number whose cross-reference is being removed |
| 2 | REF | in | Cross-reference code to delete |
| 3 | TYPE | in | Cross-reference type (e.g. ‘MFG’) |
| 4 | MSG | out | Error message (initialized to empty) |
Tables Written: PRODXREF, REFXPROD, XREFINDEX, ITEMMANF
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_XREF.DEL",
"args": {
"0": "",
"1": "",
"2": "",
"3": ""
}
}VB_XREF.REV1
Signature: SUBROUTINE VB_XREF(CO,ACTION,PARTNO,XREF,TYPE,MESSAGE)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_XREF.REV1
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [COND] conditional |
| Pattern | CRUD |
| Args | 6 |
| Description | Wrapper for product cross-reference operations. Dispatches to XREF.ADD or XREF.DEL based on ACTION parameter, passing pre-opened file handles for PRODXREF, REFXPROD, XREFINDEX, and ITEMMANF. |
| Dangerous REQTYPE | A, D |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | ACTION | in | Action to perform: ‘A’ for add, ‘D’ for delete |
| 2 | PARTNO | in | Part number to cross-reference |
| 3 | XREF | in | Cross-reference value (vendor part number, manufacturer code, etc.) |
| 4 | TYPE | in | Cross-reference type (e.g. ‘MFG’) |
| 5 | MESSAGE | out | Error or status message |
Tables Written: PRODXREF, REFXPROD, XREFINDEX, ITEMMANF
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_XREF.REV1",
"args": {
"0": "",
"1": "",
"2": "",
"3": "",
"4": ""
}
}VB_XREF0001
Signature: SUBROUTINE VB_XREF0001(CO,PARTNO,DATAFILE,NEWREC,OLDREC,ACTION,MSG)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_XREF0001
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | Process |
| Args | 7 |
| Description | Cross-reference audit processor that compares old and new record values, then adds or deletes cross-references accordingly. Reads PART.XREF.AUDIT configuration to determine which attributes trigger xref updates, then calls XREF.ADD and XREF.DEL as needed. |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | PARTNO | in | Part number being updated |
| 2 | DATAFILE | in | Data file name used to look up audit configuration in PART.XREF.AUDIT |
| 3 | NEWREC | in | New record (dynamic array) with updated field values |
| 4 | OLDREC | in | Old record (dynamic array) with previous field values for comparison |
| 5 | ACTION | in | Action code: ‘D’ for delete (skips adding new xrefs) |
| 6 | MSG | out | Error message (initialized to empty) |
Tables Referenced: PART.XREF.AUDIT
Tables Written: PRODXREF, REFXPROD, XREFINDEX, ITEMMANF
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_XREF0001",
"args": {
"0": "",
"1": "",
"2": "",
"3": "",
"4": "",
"5": ""
}
}Last updated: 2026-02-05 11:29 PM