Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Block Extended Methods (i.e. Sensor.isDetecting)

Discussion in 'Programming Questions and Suggestions' started by fntc, Jan 4, 2015.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. fntc Trainee Engineer

    Messages:
    16
    It would be nice if we could query detailted info about blocks like:

    Is a Sensor detecting and what type of Object is ist detecting.

    For now we only get the fields that are visible throught the ui.
     
  2. A2K Trainee Engineer

    Messages:
    18
    There is a hack to do that right now. You can check if sensor is detecting something using undocumented property isActive:

    Code:
    (GridTerminalSystem.GetBlockWithName("Sensor") as IMySensorBlock).isActive
    to check the object type you can switch the detection options on and off and recheck isActive field.
     
Thread Status:
This last post in this thread was made more than 31 days old.