Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I been staring at this for a while, doesn't anyone know why my VBNo is not registering when the dialog box comes up?
If System.IO.File.Exists(iProperties.Value("Custom", "Project_ Excel_File_Name")) = False Then Question5 = MessageBox.Show("The Project BOM was renamed or has been moved, Want to show me where is? If not I will make the link Inactive ", "iLogic Question", MessageBoxButtons.YesNo) If Question5 = vbYes Then Dim oFileDlg1E As Inventor.FileDialog = Nothing InventorVb.Application.CreateFileDialog(oFileDlg1E) oFileDlg1E.InitialDirectory = oOrigRefName1E oFileDlg1E.CancelError = True On Error Resume Next oFileDlg1E.ShowOpen() If Err.Number <> 0 Then Return ElseIf oFileDlg1E.FileName <> "" Then selectedfile1E = oFileDlg1E.FileName End If MessageBox.Show("You selected: " & selectedfile1E, "iLogic") iProperties.Value("Custom", "Project_ Excel_File_Name") = selectedfile1E End If Dim oAsm1F As AssemblyDocument = ThisDoc.Document Dim oDef1F As AssemblyComponentDefinition = oAsm1F.ComponentDefinition Dim pName1F As String = "Project_BOM" 'Property name here For Each oRefDoc1F As Document In oAsm1F.AllReferencedDocuments If oRefDoc1F.DocumentType = DocumentTypeEnum.kPartDocumentObject _ AndAlso oDef1F.Occurrences.AllReferencedOccurrences(oRefDoc1F).Count > 0 On Error Resume Next oRefDoc1F.PropertySets("Inventor User Defined Properties")(pName1F).Value = iProperties.Value("Custom", "Project_ Excel_File_Name") End If Next Else If Question5 = vbNo Then MessageBox.Show("Do Stuff", "Title") End If
Solved! Go to Solution.