Message 1 of 8

Not applicable
11-25-2016
05:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to know if there is a way to change custom iproperties in other assemblies/parts.
This rule works when its inside the assembly where he needs to find the parts to change the Custom properties. But when i go to an other assembly there i want to do the same thing it can'it find the parts because he's looking in the assembly where the rule is in and not in the active one where he is looking for the referenced files.
So docFname needs to be a path or something.
iProperties.Value(docFname, "Custom", "klant")=klant
' get the active assembly Dim openDoc As Document openDoc = ThisApplication.ActiveDocument Dim docFile As Document For Each docFile In openDoc.AllReferencedDocuments 'Iterate through all of the occurrences and change the properties Dim FNamePos As Long FNamePos = InStrRev(docFile.FullFileName, "\", -1) Dim docFName As String docFName = docFile.FullFileName docFName = Right(docFile.FullFileName, Len(docFile.FullFileName) - FNamePos) iProperties.Value(docFname, "Custom", "klant")=klant iProperties.Value(docFname, "Custom", "machine")=machine iProperties.Value(docFname, "Custom", "ordernr")=ordernr iProperties.Value(docFname, "Custom", "flesnr")=flesnr iProperties.Value(docFname, "Custom", "setnr")=setnr Next
Solved! Go to Solution.