Hi,
Note: You cant delete/remove original parameter.
Try this:
Dim oApp As Application
Dim oPD As PartDocument
Dim oPCD As PartComponentDefinition
Dim oPs As Parameters
Dim oUps As UserParameters
Dim oUP As UserParameter
Dim MyGroupParam As CustomParameterGroup
Dim MyParamList As New ArrayList
oApp = ThisApplication
oPD = oApp.ActiveDocument
oPCD = oPD.ComponentDefinition
oPs = oPCD.Parameters
oUps = oPs.UserParameters
InputField:
MyGroups = InputBox("Enter Name of Groups", "Enter Field")
Try
MyGroupParam = oPs.CustomParameterGroups.Add(MyGroups, MyGroups)
GoTo AddParameters
Catch
MsgBox("Group Parameter Already Exist, Please Create Another Name", msgboxstyle.Critical, "Error")
GoTo InputField
End Try
AddParameters :
For Each oUP In oUps
MyParamList.Add(oUP.Name)
Next
MySelectedParam = InputListBox("Select Parameters", MyParamList)
For Each oUP In oUps
If oUP.name = MySelectedParam Then
MyGroupParam.Add(oUP)
End If
Next
Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.
Autodesk Inventor Professional Certified 2014