02-12-2024
03:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
02-12-2024
03:34 AM
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.