Your situation could not be reproduced. The rule performs actions only with user parameters, maybe you have something else going on in the background of the execution of this rule. I slightly optimized the code by removing redundant functions.
Sub main
Dim oDoc As Document = ThisApplication.ActiveDocument
If TypeOf oDoc Is AssemblyDocument Then
Dim oTm As TransactionManager = ThisApplication.TransactionManager
Dim oADoc As AssemblyDocument = oDoc
Dim newTM As Transaction = oTm.StartTransaction(oADoc, "ChangeUserParameters")
Call GetComponents(oADoc.AllReferencedDocuments, oADoc.ComponentDefinition.Parameters.UserParameters)
newTM.End()
oADoc.Rebuild()
oADoc.Update()
Else
End If
End Sub
Private Sub GetComponents(ByVal oRefDocs As DocumentsEnumerator, ByVal newParams As UserParameters)
For Each oRefDoc As Document In oRefDocs
If TypeOf oRefDoc Is AssemblyDocument Then
Dim oADoc As AssemblyDocument = oRefDoc
Dim oADef As AssemblyComponentDefinition = oADoc.ComponentDefinition
If oADoc.IsModifiable Then
Call ChangeParam(oADef.Parameters, newParams)
End If
Else If TypeOf oRefDoc Is PartDocument Then
Dim oPDoc As PartDocument = oRefDoc
Dim oPDef As PartComponentDefinition = oPDoc.ComponentDefinition
If oPDoc.IsModifiable Then
Call ChangeParam(oPDef.Parameters, newParams)
End If
End If
Next
End Sub
Private Function ChangeParam(ByVal oParams As Parameters, ByVal newParams As UserParameters)
For Each oParam As UserParameter In oParams.UserParameters
For Each mainParam As UserParameter In newParams
If oParam.Name = mainParam.Name Then
oParam.Value = mainParam.Value
End If
Next
Next
End Function
Run the test by changing "Value" to "Expression" in line 37.