Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am trying to add a user parameter to my assembly.
(totalArea is a variable that is calculated in another part of the code)
When I run this code, an unspecified error occurs on this line:
Dim Area As UserParameter = oUserParams.AddByValue("Surface Area for Buttering",totalArea,"in , in")
Any tips for dealing with this? I can't understand what I'm doing wrong since the error is unspecified Any help is appreciated.
oUserParams = ThisAssembly.Document.ComponentDefinition.Parameters.UserParameters ' Try to find the existing parameter Try ' Attempt to retrieve the parameter by name Dim r As UserParameter = oUserParams.Item("Surface Area for Buttering") Catch ' If the parameter doesn't exist, add it Dim Area As UserParameter = oUserParams.AddByValue("Surface Area for Buttering",totalArea,"in , in") End Try
.
Solved! Go to Solution.