01-23-2019
12:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
01-23-2019
12:44 AM
Hello
I stripped the code back & the error message highlights a different line to what causes the problem:
SyntaxEditor Code Snippet
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 As UserParameter = oDrawParams.AddByValue("BE_PC" , "BE", UnitsTypeEnum.kTextUnits) End Try
the above works, it's adding the code below which causes the error:
SyntaxEditor Code Snippet
MultiValue.SetList("BE_PC", "BE", "PC") BE_PC = "BE"
So far:
Open a drawing, check if the required parameter is there - working
if it's not there create it - working
make the parameter multivalue - failing
the error is caused by lines 14 & 15 - not line 11:
Thanks again
Andrew