Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Remove parameter from User Parameters after adding to Custom Parameter Group

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
DRoam
1564 Views, 10 Replies

Remove parameter from User Parameters after adding to Custom Parameter Group

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?

 

 

10 REPLIES 10
Message 2 of 11
Pratik.Ksoni
in reply to: DRoam

You can right click on User parameter and delete it.

See attached file can help you.

 

Thanks

Pratik

Message 3 of 11
CCarreiras
in reply to: Pratik.Ksoni

@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

Message 4 of 11
DRoam
in reply to: Pratik.Ksoni

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

Message 5 of 11
JaneFan
in reply to: DRoam

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
Message 6 of 11
dgreatice
in reply to: DRoam

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
Message 7 of 11
DRoam
in reply to: JaneFan

@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).

Message 8 of 11
Anonymous
in reply to: DRoam

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

 

Untitled.png

Message 9 of 11
Anonymous
in reply to: Anonymous

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

Sorry

/Michael

 

 

 

Message 10 of 11
hamed_nemati
in reply to: Anonymous

How can you create custom paremeters group?

Message 11 of 11
WCrihfield
in reply to: hamed_nemati

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report