iFactory Part using iLogic

iFactory Part using iLogic

Anonymous
Not applicable
1,258 Views
6 Replies
Message 1 of 7

iFactory Part using iLogic

Anonymous
Not applicable

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 


0 Likes
Accepted solutions (1)
1,259 Views
6 Replies
Replies (6)
Message 2 of 7

HermJan.Otterman
Advisor
Advisor

Hello Truc.Quach

 

keep in mind:

iParts and iAssemblies have some limitations. max 1000 rows

and they will get slow.

Excel makes is slow

how large will your catalog be??

only parts? or also assemblies?

how do you keep track of all those files without Vault?

iparts are linked to there mother, the advantage of CC is that they are not.

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 3 of 7

Anonymous
Not applicable

Hey Herm,

 

the current part I am doing is about 6,400 parts but I can also split this part into separate excel files if it gets too slow. We have a own tracking system that this will integrate to, but it needs all the unique parts generate and uploaded into it.

 

By generating the part through code and parameters it is still consider an iPart?

 

The goal I am trying to achieve is too create all 6,400 parts as if I were to go in create them all by hand one by one without actually doing that lol.     

0 Likes
Message 4 of 7

HermJan.Otterman
Advisor
Advisor

do they all look the same?

with iParts, they will be derived from a master, and that link wil be there.

how many dimensions wil change?

do you have all variations in an excel file (dimensions?)

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 5 of 7

Anonymous
Not applicable

right now its just a bolt and the diameter, length, material, and part code changes.

 

Once this is figure out I will have to apply it to washers and nuts.  

0 Likes
Message 6 of 7

HermJan.Otterman
Advisor
Advisor

Why?? they ar all in the content center..? just add you number

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 7 of 7

Anonymous
Not applicable
Accepted solution

We have our own program that we have to integrate all the hardware to.

 

I ended up figuring a solution and will put it here in case anyone else ever has the same issue.

 

create two separate codes

 

one to pull in the excel data and update the parameters of the part

one to update and save the file

 

create a separate API that runs the first code, then the second code, and updates the excel row call out.

0 Likes