MWAutoNumber for MechWorks PDM Automation.
Appendix D: Custom Scripting – DataEntr_PostEvent.LST example
'Load the categories output by the default script if docType <> "D" AND theExtension<> ".IPN" then ok = InputAllCategoryValues Else
ok = GetThisDrawingComponentUid(Part_Asm_Uid)
'DBWMsgBox("component uid: " & Part_Asm_Uid)
if ok and Part_Asm_Uid<>"" then
ok = GetCategoriesfromOldPrtAsm(Part_Asm_Uid)
End If
End If '-----------------------------------'
'debugging - check all values output by main script 'msg = "NewFolderPath: " & NewFolderPath
'msg = msg & vbCrlf & "NewFileName: " & NewFileName 'msg = msg & vbCrlf & "NewNumber: " & NewNumber 'msg = msg & vbCrlf & "NewDescription: " & NewDescription 'msg = msg & vbCrlf & "NewProject: " & NewProject 'If MaxCategorizable > 0 Then 'Set if category wizard is shown ' for i = 1 to MaxCategorizable 'msg = msg & vbCrlf & NameFieldsLinkedToCategories(i) & ": " & ValueFieldsLinkedToCategories(i) ' next 'End If 'DBWMsgBox(msg)
'---------------------------------------------------------' '--------END DO NOT CUSTOMIZE THIS SECTION----------------' '---------------------------------------------------------'
'Customize starting here 'Output all values Call MwAutoNumber_DefaultOutputValues()
If Not AutoNumberFormat Is Nothing Then ‘Gets the object for the Format selected If UCase(AutoNumberFormat.Description) = "STANDARD" Then ‘User chose Standard Format DBWOutput "NOTES" , "STANDARD PART" , ForAppending ‘Also set NOTES field End If End If
'Uncomment the next line to cancel the save as process entirely 'Call CancelCustomScript()
End Sub
40136 Bologna Italy
www.mechworks.com
124
Made with FlippingBook - Online Brochure Maker