I am assuming that the examples you are using are the DAQmx C# examples (Program Files\National Instruments\MeasurementStudio70\DotNET\Examples\DAQmx\Switches).
These examples work for all SCXI and PXI switches that are supported in DAQmx. NI-DAQ 7.1, the currently released version of NI-DAQ driver software, does not support PXI-2501/2503 under DAQmx. These modules will be supported in DAQmx in the next version of the driver.