Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
What is a simple way to make the "File" name and "Part number" match using iLogic?
Solved! Go to Solution.
What is a simple way to make the "File" name and "Part number" match using iLogic?
Solved! Go to Solution.
Depends from what context (from assembly, from part, on save?). The filename is harder to change so I would match the part number to the filename.
You can change the part number to the filename for the active document wiht the following line:
iProperties.Value("Project", "Part Number") = ThisApplication.ActiveDocument.FullFilename
This will use the FULL filename, so including directory and extension. If you just want the filename you can use:
iProperties.Value("Project", "Part Number") = System.IO.Path.GetFileNameWithoutExtension(ThisApplication.ActiveDocument.FullFilename)
TY i was struggling creating iparts and publishing them to library because every size change, deleted the partname propiety, this is a great shortcut when you are a filename na*zi like me . !