- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Hello
I have a super bit of clunky code which I'm trying to repurpose.
The original requires a spread sheet setting up with the assembly browser names entering alongside detailed & simplified paths to files - all is suppressed in the Assembly. The code iterates down the list - swaps out simple for detail, exports a dwf, swaps back to detail, suppresses & moves to the next browser name (to create a set of dwf's to load into Navisworks from a pretty large .iam file) - crude but functional.
The same method is being used to open a set of drawings, opening will work, can't close them though!
I've other bits of code to print open drawings but nothing to close them - my guess was to use the excel file to give me the path to open the file, then export versions to a desktop folder, then close the file. The last part is difficult to find- can you close a different open file from iLogic?
'NNx number count to iterate down excel row
'FFx Full File path held in column D
'LIST.xlsx column D contains the file path
For NNx = 2 To 3 ' for testing only the top 3 rows are used
'PIX = "A"& NNx
'BNX = "B"& NNx
'LBX = "C"& NNx
FFX = "D" & NNx
'MessageBox.Show(PIX, "PIX")
' PIZ reads the PI number from column A
' BNZ reads the Browser Name from Column B
' LBZ reads the path of the substitute path
' FFZ reads the path to the Full Fat detailed part
'PIZ = GoExcel.CellValue("LIST.xlsx", "Sheet1", PIX)
'BNZ = GoExcel.CellValue("LIST.xlsx", "Sheet1", BNX)
'LBZ = GoExcel.CellValue("LIST.xlsx", "Sheet1", LBX)
FFZ = GoExcel.CellValue("LIST.xlsx", "Sheet1", FFX)
'MessageBox.Show(PIZ, "PI")
'MessageBox.Show(BNZ, "BN")
'MessageBox.Show(LBZ, "LB")
'MessageBox.Show(FFZ, "FF")
Dim aList As New List(Of String)
aList.Add(FFZ)
For Each Str As String In aList
System.Console.WriteLine(Str)
ThisDoc.Launch(Str)
'code inserted here to save as pdf, dwg, dxf & export parts list in deskstop folder
'ThisDoc.Close(Str) - made up line & obviously doesn't work!
Next
Next
Regards
Andrew
¡Resuelto! Ir a solución.