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

@andrew_canfield ,

 

Still I strongly believe that error is due to line 12. Below iLogic code does not throw error. Just changed variable name for userparameter from BE_PC to BE_PC_1.

BE_PC = "BE"' deleted parameter


Dim oDrawDoc As DrawingDocument = ThisApplication.ActiveDocument
Dim oDrawParams As UserParameters = oDrawDoc.Parameters.UserParameters

'oMyParameter = ThisApplication.ActiveDocument.ComponentDefinition.Parameters.UserParameters

Try
'Change value of param
Parameter("BE_PC") = Parameter("BE_PC")
Catch
'Create Param as it doesn't exist
Dim BE_PC_1 As UserParameter = oDrawParams.AddByValue("BE_PC" , "BE", UnitsTypeEnum.kTextUnits)
End Try 

MultiValue.SetList("BE_PC", "BE", "PC")
BE_PC =  "BE"

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network