Issues Changing Parts Using iLogic from excel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hye everyone,
I was wondering if I could please get some help. I am needing to use an excel spreadsheet to replace components in an assembly based off a pump model. Currently I will only need to be replacing the pump casing (Volute), bellhousing and the motor. I have created a excel spread sheet that has numerous columns but I am only going to be looking at 4 of them, being Pump model, Volute, Bellhousing and motor. I followed KETIVAVA on using excel and used their code however, when I try and run it, nothing changes. I have even bought in other files that look completely different and named them what they are in the excel spreadsheet and they do not swap. I have run it with different log level options and nothing is coming up. Can anyone point me in the right direction as to what has been going on. I made a more simplified spreadsheet just to get it going as well and nothing.
Dim asmDoc As AssemblyDocument = ThisDoc.Document
Dim compDef As AssemblyComponentDefinition = asmDoc.ComponentDefinition
Dim allOcc As ComponentOccurrences = compDef.Occurrences
Dim excelFileLocation As String = "********\End Suction Pump Drawings\Pumps\Pump Layout Spreadsheet Test.xlsx"
work = GoExcel.FindRow(excelFileLocation, "Sheet1", "Pump Model", "=", PumpModel)
For Each occurrence As ComponentOccurrence In allOcc
Try
replacementModelName = GoExcel.CurrentRowValue(occurrence.Name)
Catch
Continue For
End Try
Try
Component.Replace(occurrence.Name, replacementModelName, True)
Catch
End Try
Next
I have created a user parameter called PumpModel and a form as well.
I have attached the spreadsheet.
Kind Regards,
Trent