Hello
It is not possible to make an object sensitive to a layer combination and it is really a standing wish.
But a way to do what you want is zone. An object is sensitive to the zone.
Then you can have a zone on a particular layer.
This layer select to appear only on your particular layer combination. The presence —or not— of this zone may affect the appearance of your object.
the code is the next
request ("Zone_relations","",nom_zone,code_zone)
For scripting take a look to this topics in FC-Cadlink —sorry in french but really better than my english…—
Changement d'apparence suivant plans ;
HTH