Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic Rule for saving new parts with part No and name

1 REPLY 1
Reply
Message 1 of 2
Anonymous
1128 Views, 1 Reply

iLogic Rule for saving new parts with part No and name

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

 

1 REPLY 1
Message 2 of 2
xiaodong_liang
in reply to: Anonymous

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"

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report