Current value

Experimenter
Experimenter

I have placed an area sensor in a part file.

Dont know how to use the Object.CurrentValue command to get the current sensor value

 

Regards

Ali Kamran

4 REPLIES

Re: Current value

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Hi,

CurrentValue is a Property (read only).

So just get Sensor object of your Document and use the value:

 

 oPartDocument  = oAppl.ActiveDocument

 dim oSensor as SolidEdgeFramework.Sensor

 oSensor = oPartDocument.Sensors.Item(1) ' example, just use the first

 dim SArea as double = oSensor.CurrentValue

 

 regards JB

regards

JB
VS2015, SE ST10

Re: Current value

Experimenter
Experimenter

Thanks JB 

It worked fine.

 

One more question , if I want to supress the sensor and then unsupress , any idea how to do that ?

 

Regards

 

Ali Kamran

Re: Current value

Experimenter
Experimenter

I would like to put again the question.

First at time of sensor placement Sensor update should be set to manual Update

 

later at required instance update it ...

how to do it ?

any ideas please

 

Regards

Ali

Re: Current value

Siemens Valued Contributor Siemens Valued Contributor
Siemens Valued Contributor

Hi @alikamran,

Three SensorUpdateMechanismConstants enumeration are available on Sensor object.

 

Member Value Description
seSensorUpdateMechanismAutomatic 1 Automatic sensor update
seSensorUpdateMechanismInvalid 0 Invalid sensor update mechanism
seSensorUpdateMechanismManual 2 Manual sensor update

 

You can make use it as shown below.

objSensor.UpdateMechanism = SolidEdgeFramework.SensorUpdateMechanismConstants.seSensorUpdateMechanismManual

 

Regards,

Kaustubh