Hi, here is your rule "Aansturen sparing" a bit updated:
'Sparing type nummer aansturen afhankelijk van keuze.
Select Case Sparingtype
Case "Sparing 1"
Sparing_type_nr = 1
Case "Sparing 2"
Sparing_type_nr = 2
Case Else
Sparing_type_nr = 0
End Select
'Sparing aan of uit zetten afhankelijk van keuze.
If Sparing_type_nr = 1 Then
Feature.IsActive("Sparing1") = True
Feature.IsActive("Sparing2") = False
Else if Sparing_type_nr = 2 Then
Feature.IsActive("Sparing1") = True
Feature.IsActive("Sparing2") = True
Else if Sparing_type_nr = 0 Then
Feature.IsActive("Sparing1") = False
Feature.IsActive("Sparing2") = False
End If
'Melding als de locatie afstand van sparing 1 groter is dan sparing locatie 2.
If SparingLocatie1 >= SparingLocatie2 Then
If Feature.IsActive("Sparing2") = True Then
MessageBox.Show("Let op afstand sparing 1 is groter dan sparing 2 ", "Afstand sparing")
End If
End If
'Áls sparing locatie 1 is groter dan sparing locatie 2 word sparing 2 met 110mm voorbij sparing 1 geplaatst.
If SparingLocatie1 >= SparingLocatie2 Then
SparingLocatie2 = SparingLocatie1 + 110
End If
Should work now
Consider using "Accept as Solution" / "Kudos" if you find this helpful.
- - - - - - - - - - - - - - -
Regards,
Mike
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods