- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Greetings everyone,
Back again for a little help. Obligatory I code like a toddler preface.
What I'm trying to do is put guard rails in place for a manual BOM entry to designate part finish.
Long story short, we've worked on a roundabout way of creating a rule that creates Material_Finish as a multi-value parameter, that then gets transcribed to "Authority" because you can only use Standard iProperties in view label creations.
The rules created, are causing issues, so I think it's best to just cut out the middle person and directly populate the Authority property we've chosen to designate finish, with some guards in place.
Problem is, the code I attempted works to check a list... but I would like it to just check the list and report back if the specified finish isn't in the list. Currently it does that, but it throws 3 message boxes at you.
I'd simply like to check a list and report back IF the finish ISN'T in the list at all. Also it would be nice if it would check all occurrences in an assembly, currently I think this would only check the active document
Code attached below, and many thanks in advance,
Gabe
testString = iProperties.Value("Design tracking Properties", "Authority") Dim List As New ArrayList List.add("GALV") List.add("ARTIST") List.add("RAW") List.add("POWDER COAT") Dim Ostring As Object i = 0 For Each Ostring In List If testString.Contains(List.Item(i)) Then 'MessageBox.Show(List.Item(i) & ": was found!", "iLogic") Else MessageBox.Show("Invalid Finish.", "Finish") End If i= i+1 Next
Structural Designer/Engineering Checker
Solved! Go to Solution.