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: 

How to delete existing user parameters

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
RoyWickrama_RWEI
1221 Views, 2 Replies

How to delete existing user parameters

I have a iLogic created which is fine (thanks for help I got from one of the postings). However, I also need to amend the same to delete existing generic single value user parameter (UP_GenSV) and existing multi-value user parameter (UP_MV). Pl. help. See the attached file.
Tags (1)
2 REPLIES 2
Message 2 of 3

Could you please try this iLogic code

'Parameter name:
Dim Name As String = "AAA"

Dim oDoc as Inventor.Document = ThisDoc.Document
Dim oDef as ComponentDefinition = oDoc.ComponentDefinition
Dim oPar As UserParameter = oDef.Parameters.UserParameters.item(Name)
oPar.Delete
oDoc.update

MsgBox("DONE")

This works for user parameters of any type. 

Cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 3 of 3

It worked so nicely. Great. Thanks a lot. However, please note that, I am planning to do a lot. So, more are to come (but slowly).

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

Post to forums  

Autodesk Design & Make Report