The following example script is typical of what you might put into a BeforeCheckInChangesFinalize event handler in order to update both PDFs and DWGs when the user edits properties on a metadata card that relate to title block fields:



dim scriptLib : set scriptLib = GetExtensionObject("PentagonDOCS.Core.ScriptLibrary")

dim pdfProcessor : set pdfProcessor = GetExtensionObject("PentagonDOCS.PDFProcessor")

dim dwgProcessor : set dwgProcessor = GetExtensionObject("PentagonDOCS.DWGProcessor")


pdfProcessor.WriteLog "PDFProc","Checking file extension"

if scriptLib.IsFileExtension(Vault,ObjVer,".pdf") then

                pdfProcessor.WriteLog "PDFProc","File is PDF"

                pdfProcessor.SyncPropertiesFromMFiles Vault, ObjVer,"PDFProc"

end if


pdfProcessor.WriteLog "DWGProc","Checking file extension"

if scriptLib.IsFileExtension(Vault,ObjVer,".dwg") then

                dwgProcessor.WriteLog "DWGProc","File is DWG"

                dwgProcessor.SyncPropertiesFromMFiles Vault, ObjVer,"DWGProc"

end if