You will have to use the python capabilities in H3D to achieve this, mostly because MagneticSurface does not have an enabled field. If it did have an enabled field you could just setup a booleansequencer as in the example examples/All/BooleanSequencer.x3d
The best way is probably to just create a specialised field that takes an SFBool as input and outputs an SFNode. Something like this (code not checked for syntax errors and neither completed):
[code]class SurfaceEnabler( TypedField( SFNode, SFBool ) ):
def update( self, event ):
magnetic_surface_node = createX3DNodeFromString(“”””””)
The input boolean would come from a setup as in the BooleanSequencer.x3d example I referred to.