Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have iLogic for import project custom properties from xls which generated ERP system. It works ok. I use that iLogic in my top assembly. But I would like, if it's possible, when I import custom property in e.g. top assembly that all my subassemblies and parts also have this properties.
And one minor thing, is it possible after importing that iLogic generate message "All Custom Properties Successfully Imported"?
Dim odoc = ThisDoc.Document
Dim oFileDlg As Inventor.FileDialog = Nothing
InventorVb.Application.CreateFileDialog(oFileDlg)
oFileDlg.Filter = "Spredsheet Files (*.xls) (*.xlsx) (*.xlsm) (*.xlsb)|*.xls; *.xlsx; *.xlsm; *.xlsb"
'Set open location using one of these 2 options below, "1)Hard coded" or "2)Project location":
'oFileDlg.InitialDirectory = "D:\INVENTOR DATA\PROJEKTI\" 'Hard Coded path:
oFileDlg.InitialDirectory = ThisApplication.DesignProjectManager.ActiveDesignProject.WorkspacePath
'Show File Open Dialogue
oFileDlg.DialogTitle = "Browse for XLS File"
oFileDlg.ShowOpen()
oXLfile = oFileDlg.FileName
If oXLfile = "" Then : Return : End If
iProperties.Value("Custom", "Referenced Spreadsheet File Name") = oXLfile
'Open Excel file
GoExcel.Open(oXLfile, "Job Sheet")
'Read from Excel file
iProperties.Value("Custom", "AreaCode") = GoExcel.CellValue("H4")
iProperties.Value("Custom", "AreaName") = GoExcel.CellValue("C4")
iProperties.Value("Custom", "ComponentCode") = GoExcel.CellValue("H7")
iProperties.Value("Custom", "ComponentName") = GoExcel.CellValue("C7")
iProperties.Value("Custom", "Priority") = GoExcel.CellValue("P7")
iProperties.Value("Custom", "D365WoNumber") = GoExcel.CellValue("H8")
iProperties.Value("Custom", "DWGName") = GoExcel.CellValue("C6")
iProperties.Value("Custom", "DWGRef") = GoExcel.CellValue("H6")
iProperties.Value("Custom", "FSCReg") = GoExcel.CellValue("N20")
iProperties.Value("Custom", "HealthSafetySheets") = GoExcel.CellValue("H19")
iProperties.Value("Custom", "IssuedTo") = GoExcel.CellValue("P6")
iProperties.Value("Custom", "ItemCode") = GoExcel.CellValue("H5")
iProperties.Value("Custom", "ItemName") = GoExcel.CellValue("C5")
iProperties.Value("Custom", "JobDescription") = GoExcel.CellValue("A9")
iProperties.Value("Custom", "LoadList") = GoExcel.CellValue("C20")
iProperties.Value("Custom", "Notes01") = GoExcel.CellValue("A10")
iProperties.Value("Custom", "Notes02") = GoExcel.CellValue("A11")
iProperties.Value("Custom", "Notes03") = GoExcel.CellValue("A12")
iProperties.Value("Custom", "Notes04") = GoExcel.CellValue("A13")
iProperties.Value("Custom", "Notes05") = GoExcel.CellValue("A14")
iProperties.Value("Custom", "Notes06") = GoExcel.CellValue("A15")
iProperties.Value("Custom", "Notes07") = GoExcel.CellValue("A16")
iProperties.Value("Custom", "Notes08") = GoExcel.CellValue("A17")
iProperties.Value("Custom", "Notes09") = GoExcel.CellValue("A18")
iProperties.Value("Custom", "ProjectCode") = GoExcel.CellValue("H3")
iProperties.Value("Custom", "Project_Name") = GoExcel.CellValue("C3")
iProperties.Value("Custom", "RefDrawing") = GoExcel.CellValue("C6")
iProperties.Value("Custom", "TehnicalDataSheets") = GoExcel.CellValue("P19")
iProperties.Value("Custom", "LoadList") = GoExcel.CellValue("C20")
iProperties.Value("Custom", "UnitQty1") = GoExcel.CellValue("A22")
iProperties.Value("Custom", "UnitQty2") = GoExcel.CellValue("A23")
iProperties.Value("Custom", "UnitQty3") = GoExcel.CellValue("A24")
iProperties.Value("Custom", "UnitName1") = GoExcel.CellValue("B22")
iProperties.Value("Custom", "UnitName2") = GoExcel.CellValue("B23")
iProperties.Value("Custom", "UnitName3") = GoExcel.CellValue("B24")
iProperties.Value("Custom", "UnitEmpty1") = GoExcel.CellValue("C22")
iProperties.Value("Custom", "UnitEmpty2") = GoExcel.CellValue("C23")
iProperties.Value("Custom", "UnitEmpty3") = GoExcel.CellValue("C24")
iProperties.Value("Custom", "UnitDescription1") = GoExcel.CellValue("D22")
iProperties.Value("Custom", "UnitDescription2") = GoExcel.CellValue("D23")
iProperties.Value("Custom", "UnitDescription3") = GoExcel.CellValue("D24")
'Close Excel file
GoExcel.Close
Solved! Go to Solution.