Community
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Brian R. Iwaskewycz" <
href="mailto:biwaskewycz@patransformer.com">biwaskewycz@patransformer.com>
wrote in message
href="news:978BC001F1931256FBC981E9E1C1EDBA@in.WebX.maYIadrTaRb">news:978BC001F1931256FBC981E9E1C......
Is there any way to delete a user parameter using the API? I had
expected there to be a Delete method on a UserParameter object, but there
isn't.
Brian R.
Iwaskewycz
Senior Mechanical Engineer
PA
Transformer Technology, Inc.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Stephen Anderson" <
href="mailto:sanders.tech@netzero.com">sanders.tech@netzero.com> wrote
in message
href="news:65CF4DE36CEA4E8611C81EB7583B847D@in.WebX.maYIadrTaRb">news:65CF4DE36CEA4E8611C81EB7583......
Public oProp4 As
PropertySet
' User Defined
Properties
Set oProp4 =
oPart.PropertySets("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")
If
oProp4(1).Name <> "Finish" Or oProp4(2).Name <> "MAT'L CODE" Or
oProp4(3).Name <> "MATERIAL" Or oProp4(4).Name <> "SUB NO." Or
oProp4(5).Name <> "MFG CODE" Or oProp4(6).Name <> "RSP" Or
oProp4(7).Name <> "RefPart"
Then
For Each oPropNew In
oProp4
oProp4(1).Delete
Next
This routine checks for a specific
bunch of defined peoperties to be present in a certain order (though Inventor
lists alpgabetically, the sequence is whatever it is). If they are not
there, it deletes them, one by one in the for-each statement. Later in
the program, they are re-added. Prior to deleting, the existing values
can be saved as variables ard re-used at re-creation time if desired.
Hope this helps!