# 6. Installation and first usage¶

## 6.1. Requirements¶

sDNA requires Windows XP or later. We suggest a minimum of 1GB RAM, but obviously faster computers and more memory will be of use in analyzing larger networks. sDNA can run in 32- or 64-bit mode depending on the host application.

The toolbox can be used in any of a number of ways:

• As a plug-in to ArcGIS 10.1 or later, or
• As a plug-in to QGIS, or
• As a plug-in to Autocad (various versions; 2010-2013 have been tested), or
• From the windows command line, or
• From sdnapy, the python API to sDNA.

Note that Autocad usage is limited to network shape analysis using sDNA Prepare and Integral. For more detailed analysis, we recommend using Autocad Map3d or other suitable software to convert CAD to 3d Shapefile, then processing in the free QGIS.

## 6.2. Installation¶

Further steps are then needed depending on how you plan to use sDNA.

## 6.3. sDNA+¶

sDNA+ is the extended version of sDNA, containing enhanced features. The download is the same as for standard sDNA. To unlock the sDNA+ features, you need to purchase of an enhanced serial number via our sDNA+ page.

## 6.4. Using sDNA for the first time¶

How you use sDNA depends on your host application.

### ArcGIS¶

1. From inside ArcGIS, go to ArcToolbox.
2. Right click the root of the ArcToolbox tree and choose Add Toolbox...”.
3. Navigate to the place you have installed sDNA (usually c:\Program Files (x86)\sDNA) and select the toolbox sdna.pyt.
4. (Optional) Repeat steps 2 and 3 to add the toolbox sDNA_ArcGIS_extra_tools.tbx.
5. (Optional) To permanently add sDNA to ArcToolbox, right click the root of ArcToolbox and choose Save settingsto Default.

sDNA appears as a set of tools within ArcToolbox. Results can be displayed using the Symbology tab of the Layer Properties dialog. If you are not familiar with using tools from ArcToolbox, or changing layer symbology, visit the ArcGIS Desktop Help website for further details.

### QGIS¶

1. From inside QGIS, choose PluginsManage and install plugins...
2. Type “sdna” into the search box; you should find the Spatial Design Network Analysis plugin
3. Click Install Plugin, then Close
4. Go to ProcessingToolbox to show the processing toolbox
5. At the bottom of the processing toolbox, change from Simplified interface to Advanced interface
6. “Spatial Design Network Analysis” should now appear in the processing toolbox
7. Go to ProcessingOptionsGeneral and ensure Keep dialog open after running an algorithm is switched on.

Results of sDNA operations can be displayed using layer styles. After running sDNA, right-click the relevant layer in the layers panel, choose PropertiesStyle, change Single Symbol to Graduated and select the data you want to display.

1. From the Ribbon, choose ManageLoad Application
2. Under Startup Suite click Contents… then Add…
3. Navigate to the place where you installed sDNA (usually c:\Program Files (x86)\sDNA) and select the application sdna.vlx.
4. Click Close on the Startup Suite dialog
5. Click Close on the Load Application dialog
1. From the Ribbon, choose ManageCustom User Interface (CUI)
2. Locate the button for loading a Partial Customization File – the icon is a folder symbol with a green plus sign
3. Navigate to the place where you installed sDNA (usually c:\Program Files (x86)\sDNA) and select sDNA.cuix
4. Click OK

In Autocad 2010 onwards, sDNA will appear as a series of buttons on the ribbon toolbar labelled “sDNA”. Simply click these buttons to load the tools.

In older versions of Autocad, it is necessary to know the commands for running sDNA. (These can also be used in Autocad 2010 onwards, if preferred). Enter one of the following at the command prompt:

• sdnaprepare to prepare the network
• sdnaintegral to analyze the network
• sdnacolor or sdnacolour to display the results of sdnaintegral

### Using sDNA from the command line¶

sDNA can also be used to process shapefiles from the command line. Before starting, you will need to install Python, if you don’t have it already. We have tested with versions 2.6 and 2.7; other versions may work as well. You can download Python 2.7.3 from here:

If your file associations are set up correctly for python (the python installer should have done this) and the sDNA bin directory (usually c:\program files\sdna\bin) has been added to your path (the sDNA installer should have done this), then you can use command line sDNA as follows.

The commands are sdnaprepare.py, sdnaintegral.py, sdnalearn.py and sdnapredict.py. Note that from the command line, various functions handled separately in QGIS and ArcGIS (geodesics, convex hulls, link measures, destination maps, network radii) are all handled by sdnaintegral.py. See Advanced configuration and command line options for more details; alternatively to learn the command for a given operation, try performing the operation from QGIS and see the command QGIS calls (shown in the algorithm dialog).

If you have ArcGIS 10.1 or later installed, then the command line interface to sDNA will also support work on geodatabase paths. Of course you can use sDNA from inside ArcGIS as well, but some of us like to make batch scripts to run outside of Arc.

#### Troubleshooting¶

If you haven’t, can’t or don’t want to set up file associations, then the instructions above won’t work. You will have to load python explicitly, e.g. (assuming python is on your system path):

python -u sdnaprepare.py --help

(or if it isn’t):

c:\path\to\python -u sdnaprepare.py --help

(or if neither python nor the sdna bin folder are on your path)

c:\path\to\python -u c:\path\to\sdna\bin\sdnaprepare.py –help

and so on, for the other sDNA commands detailed above.

### Using sDNA through the Python interface¶

Those experienced in programming may want to use sDNA Prepare and sDNA Integral directly through our Python API. This is called sdnapy; the canonical example of its use can be found in runcalculation.py in the sDNA program folder.