I wanted to use Network Analyst toolbox to do a vehicle routing problem in ArcGIS. When I right click the related shapefile which includes links of the network, there is no "create network dataset" option there. I created a network before but that was not the one I wanted to use. Now that I want to create a new network dataset, it does not let me do that. when I chooses "a new vehicle routing problem" from Network Analyst toolbar, it seems that it is using the information from the previous network dataset that I created. I am confused. I wonder if I should remove the previous network dataset so it let me create new network datasets. I even removed the previous network dataset but it seems that the toolbox is still considering that.
A Network Dataset needs to be created in a Feature Dataset within a Geodatabase. Right-click on the Feature Dataset that contains your network features, and you'll be given the option to create a new Network Dataset
You can not create a Network Dataset directly at the base level of the geodatabase. This may be why you don't get the option when you right-click within the geodatabase. Move your network feature classes into your feature dataset (spatial reference will need to match), and create the Network from there.
It seems as @bahar has added a created network dataset into ArcMap map and tries to create a network analyst layer, because he said:
when I chooses "a new vehicle routing problem" from Network Analyst toolbar,
Sometimes when removing an old ND and adding a new one, especially when they have the same name, some cache can be left. It's best to create a new map document and add the new ND there.
Also keep in mind that the same polyline shapefile cannot participate in multiple network datasets. So, if you have used your shapefile to build a ND, it will be impossible to re-use it for building another one.