- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Everyone,
I have been combining through the forums trying to figure out the best way to make a huge catalog of hardware without using Vault or content center. Originally, my thoughts were that an iFactory would work but found out that we need the properties still in the child parts. Then I read someone suggestion a solution to do an iLogic iFactory part. So far I have been able to get the parameters to update from an excel and save the separate files. This all seemed to easy and of course I was right, none of the parameters were saving with the separate files. I tired separating the rules and that didn't work. Anyways, I've hit a fence so any help will be greatly appreciated. Thanks for your time.
'Define Range
oStartRow = 1
oEndRow = 3
Dim o As Integer
For o = oStartRow To oEndRow
Dim i As Integer
i = i + 1
iProperties.Value("Project", "Description")=GoExcel.CellValue(EXCEL_LINK,"Sheet1","A" & i)
DIA=GoExcel.CellValue(EXCEL_LINK,"Sheet1","C" & i)
LEGNTH=GoExcel.CellValue(EXCEL_LINK,"Sheet1","D" & i)
MATERIAL=GoExcel.CellValue(EXCEL_LINK,"Sheet1","E" & i)
PART_CODE=GoExcel.CellValue(EXCEL_LINK,"Sheet1","B" & i)
FILE_NAME=PART_CODE & ".ipt"
ThisApplication.ActiveDocument.update
'iLogicVb.RunRule("FileCreate")
MsgBox("Diameter =" & DIA & vbCrLf &
"Legnth=" & LEGNTH & vbCrLf &
"Material ="& MATERIAL & vbCrLf &
"Part Code ="& PART_CODE)
File Creation
Dim oDoc As Inventor.Document = ThisApplication.ActiveDocument
Dim FName As String = oDoc.FullFileName
Dim FNP As Integer = InStrRev(FName, "\", -1)'Dim oPath As String = Left(FName, FNP)
Dim oNewName As String = PART_CODE
Dim oType As String
Select Case oDoc.DocumentType
Case kPartDocumentObject: oType = ".ipt"
Case kAssemblyDocumentObject: oType = ".iam"
Case kDrawingDocumentObject: oType = ".idw"
End Select
oDoc.SaveAs(oPath & oNewName & oType, True)
Next
Solved! Go to Solution.