Remove parameter from User Parameters after adding to Custom Parameter Group

DRoam
Mentor
Mentor

Remove parameter from User Parameters after adding to Custom Parameter Group

DRoam
Mentor
Mentor

I've just learned how to create a custom parameter group and add a parameter to it. However, the parameter remains in the User Parameters group. Is it possible to remove it from there so it's only shown in my custom group?

 

 

Reply
Accepted solutions (2)
1,568 Views
10 Replies
Replies (10)

Pratik.Ksoni
Advocate
Advocate

You can right click on User parameter and delete it.

See attached file can help you.

 

Thanks

Pratik

0 Likes

CCarreiras
Mentor
Mentor

@Pratik.Ksoni, i think DRoam is trying to do that with programing code.
I believe a mentor (rank10) of this forum knows how to delete a parameter... 

CCarreiras

EESignature

DRoam
Mentor
Mentor

Deleting the parameter deletes the parameter entirely (including from my custom group). I don't want to delete it, I just want to remove it from the User Parameters group so it's only shown in my custom group.

 

Example:

Remove from User Parameters group.png

0 Likes

JaneFan
Autodesk
Autodesk
Accepted solution

Hey @DRoam

 

There is no options when adding parameters into custom group to do so in API, so that the parameter need reside in both the original folder and the custom parameter folder now. 




Jane Fan
Inventor QA Engineer

dgreatice
Collaborator
Collaborator

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
0 Likes

DRoam
Mentor
Mentor
Accepted solution

@JaneFan thank you for confirming for me.

 

For anyone who would like to vote, I created a request for this here: API: Put parameter in custom parameter group only (remove from User Parameters).

Anonymous
Not applicable

There must have been a way of doing this in the past.

 

Untitled.png

0 Likes

Anonymous
Not applicable

Oops, just realized, how I accomplished this before. It was not custom parameters, but object parameters.

Sorry

/Michael

 

 

 

0 Likes

hamed_nemati
Participant
Participant

How can you create custom paremeters group?

0 Likes

WCrihfield
Mentor
Mentor
0 Likes