Prospex mapping software macros

Home > Support > Macros

Prospex macros - automating regular tasks

Save time and effort on repetitive Prospex actions by downloading a suitable macro. Macros are in-built wizards that simplify usage by automatically running a series of procedures in common Prospex tasks.

How to run a macro

Save the macro you are interested in on your computer. Open the Map Definition Window of Prospex, select Run from the Prospex File menu, navigate to the macro (.pwx) file you want to use and follow the on-screen prompts.

Below is a list of downloadable macros with an explanation on the procedure they automate.

Loop fill for each catchment in a directory
This macro will change the fill colour of each catchment within a single directory. You will be prompted to select a catchment. Each catchment in that directory will have the fill style altered in a loop fashion cycling through the 15 main basic colours (skipping white and black). The catchments must be selected from a subdirectory, not the root directory.

Subset point set by catchments
This macro will create subset point sets from the main point set for each catchment within a single directory. The new point sets will contain only those points from the original point set that fall within each catchment. You will be prompted to select a catchment and point set. The subset point sets will be stored in a subdirectory of the chosen directory taking the name of the catchment that they were classified against.

Subset point set by catchments using template project
This macro will make several copies of a template project. Each project will be based on a different catchment from a single directory. A point set will be classified against each catchment. Only those points from the original point set that fall within each catchment will be kept. It prompts for the template project, catchment directory and the point set to subset. The projects created are stored in a subdirectory called "Instances of [ProjectName]" and the subset point sets are stored in the subdirectory called "Instances of [PointSetName]".

Create radius catchments from point set (miles) and Create radius catchments from point set (km)
These macros will use the current point set or prompt for a point set to use. They will prompt for a radius in miles or kilometres, depending on the option set in Prospex. Finally they will ask for the tile type of catchment to create. For every location in the point set they will add tiles within the given radius from that point, creating a catchment. The names of catchments created will be derived from the first field in the point set.

Create metafiles of catchment maps from template project
A directory called "Metafiles" must exist on the C:\ drive of the computer for this macro to work. The macro will prompt for a template project and a catchment directory. For each catchment in that directory, a map will be drawn and then saved as a metafile in the “C:\Metafiles” directory. You will be prompted whether you want to continue after each one. The options are either "yes", "quit" or "all". All of the metafiles will have a “.wmf” (Windows MetaFile) file extension.

Create metafiles of projects in directory
A directory called "Images" must exist on the C:\ drive of the computer for this macro to work. The macro will prompt for the first project in a directory. Next the output size of these images is specified. For each project in that directory, a map will be drawn and then saved as image files in the “C:\Images” directory. Both “.png” (Portable Network Graphic) and “.jpg” (Joint Photographic Experts Group) image files will be created for every project.

Create image files of projects in directory
A directory called "Images" must exist on the C:\ drive of the computer for this macro to work. The macro will prompt for the first project in a directory. Next the output size of these images is specified. For each project in that directory, a map will be drawn and then saved as image files in the “C:\Images” directory. Both “.png” (Portable Network Graphic) and “.jpg” (Joint Photographic Experts Group) image files will be created for every project.

Print and move projects
This macro will print all the projects in the selected directory. A printed project will be moved into a subdirectory called “Printed”.

Export point sets into Excel spreadsheets
A directory called "Export" must exist on the C:\ drive of the computer for this macro to work. This macro exports all of the point sets from the chosen directory into separate Excel Spreadsheets. Each spreadsheet takes the name of the point set it originated from. All of these Excel spreadsheets will be stored in the “C:\Export” directory.

Export point sets into Excel worksheets
A directory called "Export" must exist on the C:\ drive of the computer for this macro to work. The macro exports all of the point sets from the chosen directory into one Excel Spreadsheet called “pxExport.xls”. Each point set will be stored in a separate worksheet within the spreadsheet and will take the name of the point set it originated from. The Excel spreadsheet will be stored in the “C:\Export” directory.

Export project spreadsheets into Excel spreadsheets
A directory called "Export" must exist on the C:\ drive of the computer for this macro to work. The macro will prompt for the first project in a directory. For each project in that directory, the spreadsheet will be loaded and results from this calculation will be saved to an Excel spreadsheet. Each spreadsheet will take the name of the project it originated from. The Excel spreadsheets will be stored in the “C:\Export” directory.

Nearest point to a point using drive times (distance)
This macro calculates the nearest point from one point set to each point within another point set in terms of distance in miles. Both point sets are chosen from the point set library. The first point set contains all of the points to drive from. The second point set is used to calculate which point is nearest to the chosen point from the first point set. The distance and name of the nearest point are returned and stored in the first point set. The second point set must have a field called “Name” to reference the name of the nearest point.

Nearest point to a point using drive times (time)
This macro calculates the nearest point from one point set to each point within another point set in terms of time in minutes. Both point sets are chosen from the point set library. The first point set contains all of the points to drive from. The second point set is used to calculate which point is nearest to the chosen point from the first point set. The time taken and name of the nearest point are returned and stored in the first point set. The second point set must have a field called “Name” to reference the name of the nearest point.