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

PropertyValue
Status[X] deprecated
Args6
Superseded ByVB_PDM.REV2

Arguments:

IndexNameDirectionDescription
0COin
1REQTYPEin
2PDMIDin
3P1287RECout
4ADDFLAGin
5MESSAGEout

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

PropertyValue
Status[+] analyzed
Safety[COND] conditional
PatternCRUD
Args5
DescriptionManages 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 REQTYPECHECKIN, CHECKOUT, SYNC, RELEASE, DELETE

Arguments:

IndexNameDirectionDescription
0REQTYPEinRequest type: CHECKIN, CHECKOUT, SYNC, RELEASE, or DELETE
1PDMIDinPDM document identifier (e.g. ‘000001.SLDPRT’)
2NEWPDMRECinoutPDM record data; on input contains new field values for checkin/checkout/sync; not used as output
3ADDFLAGinAdd flag: ‘Y’ if creating a new PDM record (used by CHECKIN and SYNC)
4MESSAGEoutStatus/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

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternInquiry
Args3
DescriptionRetrieves 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:

IndexNameDirectionDescription
0INRECinInput parameters: <1>=value-marked list of PDM IDs, <2>=transaction type (I=inquiry, O=checkout, S=sync)
1OUTRECoutOutput array of PDM record fields for each resolved document (filename, description, extension, paths, checkout info, timestamps, version, MRP, GT code)
2MESSAGEoutError 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

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args5
DescriptionAdds 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:

IndexNameDirectionDescription
0COinCompany number
1PARTNOinPart number to cross-reference
2REFinCross-reference code (e.g. vendor part number, manufacturer code)
3TYPEinCross-reference type (e.g. ‘MFG’ for manufacturer)
4MSGoutError 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

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args5
DescriptionDeletes 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:

IndexNameDirectionDescription
0COinCompany number
1PARTNOinPart number whose cross-reference is being removed
2REFinCross-reference code to delete
3TYPEinCross-reference type (e.g. ‘MFG’)
4MSGoutError 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

PropertyValue
Status[+] analyzed
Safety[COND] conditional
PatternCRUD
Args6
DescriptionWrapper 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 REQTYPEA, D

Arguments:

IndexNameDirectionDescription
0COinCompany number
1ACTIONinAction to perform: ‘A’ for add, ‘D’ for delete
2PARTNOinPart number to cross-reference
3XREFinCross-reference value (vendor part number, manufacturer code, etc.)
4TYPEinCross-reference type (e.g. ‘MFG’)
5MESSAGEoutError 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

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args7
DescriptionCross-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:

IndexNameDirectionDescription
0COinCompany number
1PARTNOinPart number being updated
2DATAFILEinData file name used to look up audit configuration in PART.XREF.AUDIT
3NEWRECinNew record (dynamic array) with updated field values
4OLDRECinOld record (dynamic array) with previous field values for comparison
5ACTIONinAction code: ‘D’ for delete (skips adding new xrefs)
6MSGoutError 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