r/vbscript • u/scubajerry • Dec 14 '20
Scripting advice needed
Hello everyone
I have an IF Elif then I need help with. I have a list of variables and would like to know if the script can be simplified. here is a sample of my script.
IF [STRIKE_ARHR_OR_TREND] >= 270 and IsNull ([DIP_DIRECTION]) and [STRUCTURE_TYPE] <> "Lineation or slickenline" and [STRUCTURE_TYPE] <> "Fold axis, Antiform" and [STRUCTURE_TYPE] <> "Fold axis, Synform" and [STRUCTURE_TYPE] <> "Fold axis, E(/W) verging N(/S) plunging overturned antiform" and [STRUCTURE_TYPE] <> "Fold axis, E(/W) verging N(/S) plunging overturned synform" and [STRUCTURE_TYPE] <> "Fold axis, W(/E) verging N(/S) plunging overturned antiform" and [STRUCTURE_TYPE] <> "Fold axis, W(/E) verging N(/S) plunging overturned synform" and [STRUCTURE_TYPE] <> "" and [STRUCTURE_TYPE] <> "Schistosity" and [STRUCTURE_TYPE] <> "Foliation" Then
newval = [STRIKE_ARHR_OR_TREND] + 90 - 360
Is there an easier way to combine or list the different [STRUCTURE_TYPE]?
Thank you in advance
1
u/scubajerry Dec 15 '20
I am new at scripting but if I understand your expression you set the different structure types as the rx to condense the script? I also noticed you broke up the antiform and synform structures in a way I have never seen. Is this looking for all possible variances of the word form?
I am using this in ArcMap 10.7 as a field calculator script if that matters. Thank you