Hey all,
Was wondering if anybody has come up with anything that they can use to asign part numbers and name to a new part using an iLogic Rule?
Was thinking something like prompt for:
project No, (1100)
Assembly No the part the will be saved into, (100)
Part No, (001)
Part Description. (First Part)
Then take this information to save the part with the data taken from these prompts
Eg: 1100-100_001 First Part
Would be great to see what people have come up with.
Thanks,
Stanfox99
Inventor 2014
Hi,
you will just need to get the corresponding iProperty and combine them to a string which will be the name for the new file. finally, call Document.SaveAs to save as it. e.g.
projNo = iProperties.Value("Project", "Project") partNo = iProperties.Value("Project", "Part Number") partDesc = iProperties.Value("Project", "Description") 'combine the string for the new filenewName = projNo & partNo & partDesc 'save as the active document to a new file.doc = ThisDoc.Document doc.SaveAs("C:\temp\" + newName+ ".ipt",True)
As to "Assembly No the part the will be saved into", this cannot be known unless this part has been inserted to an assembly, or you have known what the name of assembly will be, i.e. set the assembly No explicitly. e.g.
assemblyNo = "100"