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

Sure.  I see two things that may be causing problems.  The first thing is using that exact term 'ThisAssembly', which is already being used by iLogic in the background.  That is a term used to represent an iManagedAssembly object (Interface), so I would advise you to use a different term there for your variable name.  Next, I don't think the referenced document that you area writing the iProperty data to is getting updated or saved after the edit, so the edit may not be staying.  I modified your code a bit to help remedy these things.  Give this version a try.

Dim oADoc As AssemblyDocument = ThisDoc.Document
For Each oRefDoc As Document In oADoc.ReferencedDocuments
	If oRefDoc.PropertySets.Item("Inventor Summary Information").Item("Keywords").Value <> "Test" Then
		oRefDoc.PropertySets.Item("Inventor Summary Information").Item("Keywords").Value = "Test"
	End If
	If oRefDoc.RequiresUpdate Then oRefDoc.Update2(True)
	If oRefDoc.Dirty Then oRefDoc.Save2(False)
Next
oADoc.Update

Wesley Crihfield

EESignature

(Not an Autodesk Employee)