Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Andrii_Humeniuk
in reply to: nuclair

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.

EESignature