- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All!
For a i'm going to migrate a lot of files from solidworks to inventor and later push them in to the Autodesk Vault.
They did not use a lot of logic in the partnumbers so i'm trying to implement a new numbering logic while migrating to inventor.
Therefore i'm changing the filenames in the windows filebrowser but i'm experiencing that the part number is not the same as the filenumber when I change the name in the filebrowser.
1. Is there a better way to do the above?
2. Is there a piece of code to change the Part number in to the filename for all parts and subs in a assembly?
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @nuclair . This iLogic code takes the filename and writes it to the Part Number property. This code must be run in the main assembly.
Dim oADoc As AssemblyDocument = TryCast(ThisDoc.Document, AssemblyDocument)
For Each oRefDoc As Document In oADoc.AllReferencedDocuments
Dim sName As String = System.IO.Path.GetFileNameWithoutExtension(oRefDoc.FullFileName)
Try : oRefDoc.PropertySets("Design Tracking Properties")("Part Number").Value = sName
Catch : Continue For : End Try
Next
Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor
LinkedIn | My free Inventor Addin | My Repositories
Did you find this reply helpful ? If so please use the Accept as Solution/Like.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
If there are any more tips for migrating from solidworks to inventor (+renaming/migrating to vault) i'm open for all suggestions.