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: 

Help!! with naming files using iLogic

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
640 Views, 2 Replies

Help!! with naming files using iLogic

Hello everyone,

 

I was hoping if someone can help me with an iLogic code to automatically generate file names for assembly files.

Basically my assembly contains some iLogic parameters which inlcudes says "alpha" (mm) and "beta" (in) both are numeric parameters.

So when the i change the value of "alpha" and  "beta" i would want iLogic to save the assembly file with the following file name structure:

 

partname-alpha-beta.iam    e.g.

partname = part1

aplha =100 mm

beta = 5 in     then

file name should be:    part1-100-5

 

and then save it aswell

 

Please help me with this i would greatly appreciate

2 REPLIES 2
Message 2 of 3
bobvdd
in reply to: Anonymous

Something like this perhaps ? alpha and beta will be expressed in the default document units.

 

Bob

 

Existingname = ThisDoc.FileName(False)
FileToSave = ThisDoc.Path & "\" & Existingname & "-" & alpha & "-" & beta & ".iam"
ThisDoc.Document.SaveAs(FileToSave , True)



Bob Van der Donck


Principal UX designer DMG group
Message 3 of 3
binsar_z
in reply to: Anonymous

Hi Mike,

 

Happy learn much of iLogic from this forum. Now, if we have existing assembly, and create new ipt or subassembly in that active assembly, how to get that active assembly's file name as prefix of new ipt or subassembly file name?

 

for example,

 

active assembly file name = NF100.980

and then create new part or subassembly inside that active assembly

new part file name should be : NF100.980-001

where "NF100.980-" automaticly suggested, and "001" will filled manually.

 

thank you

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

Post to forums  

Autodesk Design & Make Report