ghadaassabry

Routing Problem

Discussion created by ghadaassabry on Apr 13, 2012
Latest reply on Apr 20, 2012 by jsandhu-esristaff
Hi,
I have a problem with the FindRoute() method
private void FindRoute()
        {

            //System.Windows.Forms.Cursor Cursor = this.Cursor;
            try
            {
                //this.Cursor = Cursors.WaitCursor;

                // set highways priority (0.0 - 100.0)   
               // SMRoadPreferences objPreferences = m_objRouter.Preferences;
                //objPreferences.set_Item(esriSMRoadType.esriSMRoadTypeHighways, (short)100);

                // set route type (Time/Length)   
              m_objRouter.NetAttributeName = "Length";                 //<= EXCEPTION AT THIS LINE

                // Set Length Units for Directions output
                SetDirectionsUnits();

==========================================================
It throws an exception here -> m_objRouter.NetAttributeName = "Length";
any suggestions??

Outcomes