- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good morning,
My goal:
1. Have iLogic look for a parameter called "MATERIALQTY" and change it to "MaterialQty".
2. Or have iLogic find both versions of the two variations of "materialqty" and make the changes I need for part.
I am running my iLogic on specific parts, not from an asm. If run just the following;
OMATQTY = Parameter.Param("MaterialQty") OMATQTY.IsKey = False OMATQTY.ExposedAsProperty = False
The code will do exactly what I am looking for as long as "MaterialQty" exist on the part. But if "MATERIALQTY" is there instead I receive an error.
I did find code that I thought would help;
Dim oDoc As Document = ThisDoc.Document Dim oCD As ComponentDefinition = oDoc.ComponentDefinition 'Dim oParam As Parameters = oCD.Parameters Dim oParam As UserParameters = oCD.Parameters.UserParameters For Each oPara As Parameter In oParam Dim oName As String = oPara.Name If UCase(Left(oName, 11)) = "MATERIALQTY" Then oPara.Delete
But I found that this code will delete both "MATERIALQTY" and "MaterialQty" parameters.
Is there a way to either find "MATERIALQTY" and change it to "MaterialQty" in the parameters so I can change .iskey and .exposedasproperty to false??? Or have iLogic look for both versions and then change either of them to iskey and .exposedasproperty to false???
Solved! Go to Solution.