Message 1 of 7
Why does this code fail when I refresh the file after move it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a code that work fine on save . But if I move a file and refresh the file , It trigger the before save ilogic code and it fail to run
oBOM.ImportBOMCustomization(sPathFile)
If i do a normal save. If work ok . why does it fail and is there a way to fix it without making Try Cathc as I have done in the code now
Sub main()
Dim oDoc As Document = ThisDoc.Document
If oDoc.DocumentType <> DocumentTypeEnum.kAssemblyDocumentObject Then Exit Sub
Dim oADoc As AssemblyDocument = oDoc
Dim oBOM As BOM = oADoc.ComponentDefinition.BOM
Dim sPathFile As String = "C:\Working Folder\CAD\Kallesoe\Kallesoe iLogic\UpdateBOMSetup\BOMSetting.xml"
Try
oBOM.ImportBOMCustomization(sPathFile)
Catch
Logger.Error("This fail when update files in iam after have move it in vault")
End Try
End Sub

