I insert the photoelectric sensor with an API, but the sensor is not recognized, if I restart the PS it recognizes. Is there a command to recognize the sensor? I enter as txcomponent and it is set to lightsensor.
the command is in c++ , and its name is:
BTW, what do you mean by "but the sensor is not recognized"?
can you share your code?
The sensor is in the sysroot I just enter the same but only when I close and open the PS again I can change the functions of the sensor, before neither the signal appears. Code that I use to insert the component.
Dim txICCD As New TxInsertComponentCreationData("light_sensor", path)
Dim txComp As TxComponent = TxApplication.ActiveDocument.PhysicalRoot.InsertComponent(txICCD)
This seems to be a behavior of PS, not just with the API. If you insert a sensor from an existing component file with the standard Insert Component command, the same thing will happen. You will need to reload the study before it will be recognized as a sensor.