- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a global form used to configure a part and insert it into an assembly. This form uses parameters that are created in the assembly as temporary place holders by a rule. The user runs the rule, the parameters are added, and the form is shown. The user then changes the parameters on the form and clicks a button to fire another rule to insert the part into the assembly. Once the part or parts are all inserted there is another button that fires a rule to close the form and delete the place holder parameters. Everything works fine except for the close rule. I am always getting this error.
The error doesn't come up if I don't delete the parameters or if I don't close the form, but I want to do both. Here is the close rule.
iLogicForm.CloseGlobal("Pulley Configuration")
Dim oAssyDoc As AssemblyDocument = ThisApplication.ActiveEditDocument
Dim oAssyUserParams As UserParameters = oAssyDoc.ComponentDefinition.Parameters.UserParameters
Dim oName As String
Dim oParamNames As New List(Of String)
'Add the required parameter names to the oParamNames list
oParamNames.Add("TEMP_PULLEY_STYLE")
oParamNames.Add("TEMP_PULLEY_TYPE")
oParamNames.Add("TEMP_PULLEY_DIAMETER")
oParamNames.Add("TEMP_FACE_WIDTH")
oParamNames.Add("TEMP_FACE_TYPE")
oParamNames.Add("TEMP_BUSHING_SIZE")
oParamNames.Add("TEMP_LAGGING_TYPE")
oParamNames.Add("TEMP_LAGGING_THICKNESS")
On Error Resume Next
'Delete each parameter in the list
For Each oName In oParamNames
oAssyUserParams.Item(oName).Delete
NextEdit: Using Inventor 2024.3.3
Andrew In’t Veld
Designer / CAD Administrator![]()
Solved! Go to Solution.