The SISfm Map Compiler is an administrator utility which translates site and building plans from Cadcorp Spatial Information System™ SWD (SIS Workspace Definition) files into Facility maps as SVG and XML files for use by the SISfm Map Enquiry module.
Map Compiler is available:
Map Compiler reads Cadcorp SIS files at the following physical locations:
DataFolderSis\site_code\site.SWD
and:
DataFolderSis\site_code\floor_loc_code.SWD
where:
DataFolderSis is the value of that setting for this application (see below) site_code is the site code defined by the SiteId and SiteCode settings for this application floor_loc_code is the building floor location code
Instead of SWD files at these locations, Windows shortcut files with the same names can be used to refer to SWD files at other locations.
Use Compile DWG Floor Plans to translate building floor plan Archibus DWG files, specified by the field to the left, into corresponding SVG and XML files. See Compiling DWG Floor Plans below. The field must be as for Compile Floor Plans.
Use Compile Floor Plans to translate building floor plan SWD files, specified by the field to the left, into corresponding SVG and XML files. The field value must be a valid building floor location code, or a partial one to select all that start with that value (for legacy reasons, any asterisk (*) characters are removed from the value first).
Use Compile Site Plan to translate an SWD file for a site, selected from the dropdown selector to the left, into corresponding SVG and XML files.
Use Update Areas to update room areas (rm.area) and gross floor areas (fl.area_gross_int and fl.area_gross_ext) in the database, specified by the field to the left as for Compile Floor Plans.
Use Help in the desktop edition to view this documentation.
The desktop edition of Map Compiler can also be run non-interactively (e.g. as a Windows scheduled task) by including the following command line parameters. These are all optional and may be specified in any order. Parameter names and qualifiers are not case-sensitive, parameter values must be enclosed in double quotes if they contain spaces, names and values must be separated by one or more spaces.
/BATCH Run Map Compiler non-interactively. By default no data is compiled. /LOGFILE filename Write the log to the specified file. If omitted, or if the specified file is invalid, the log is written to the console. /APPEND Append entries to the log file if it already exists. If omitted the contents of an existing log file are replaced. /DWGDATA [code[,code...]] Compile map data from DWG files, optionally restricted by one or more comma-separated codes. Each code may be a Compile Floor Plans field value. /MAPDATA [code[,code...]] Compile map data from SWD files, optionally restricted by one or more comma-separated codes. Each code may be either a site_id value or a Compile Floor Plans field value. /UPDATEAREAS [code[,code...]] Update room and gross floor areas, optionally restricted by one or more comma-separated codes. Each code may be a Compile Floor Plans field value. /SINCE [SWD|DATASET] [date/time] Restrict map data compilation to files modified since a specified date/time if supplied, otherwise to the date/time that Map Compiler was last run on the same computer. The qualifier SWD or DATASET may be used to further restrict /MAPDATA compilation to only internal overlays, or to only external file overlays.
The web edition of Map Compiler uses Cadcorp GeognoSIS stored procedures supplied in the SISfm Administrator installation as Map Compiler\GeognoSIS\SP_SISfm.dll, which must be copied to the Cadcorp GeognoSIS StoredProcedures\DotNet folder.
The web edition of Map Compiler reads its settings from the SISfm web configuration (see the Map Compiler section of Configuration Settings, and requires setting MapCompilerGeognoSIS.
The desktop edition of Map Compiler reads its settings from the file MapCompiler.exe.config in the same folder as MapCompiler.exe. Use a plain text editor such as Notepad to change settings to suit your environment.
Most Map Compiler settings should be the same for both editions, and should therefore be in a shared configuration file (see Configuration Administration) as shown in the example below.
File folder settings must be specified separately as URLs in the non-shared web configuration, and as physical paths in MapCompiler.exe.config.
The desktop edition requires the following settings in MapCompiler.exe.config:
Key | Value | |
CadcorpLicenceServer | The name or IP address of the Cadcorp licence server, or no-net to specify a local licence. Optional, if omitted a local licence will be used if present, otherwise the server specified in Windows environment variable CADCORP_LICENCE_SERVER_LIST, otherwise a server obtained by network broadcast. | |
CadcorpLicenceLevel | The level of the Cadcorp licence to use, either Modeller or Manager. Optional, if omitted a Modeller licence will be used if available, otherwise a Manager licence. | |
MapDatasetFolder | The physical path of a folder under which all map dataset files are stored, corresponding to the URL defined by the web application MapDatasetFolder setting. Optional, if both are not defined the Map Enquiry Layer download button is not displayed. |
Map Compiler also reads the following settings which should normally be shared with the SISfm web application:
DbConnectionIFM DbConnectionAFM FacilityType LocCodeFormat LocCodeOutput LocCodeOutputB EmView EmNameFields EmNumberField EmExtraKeyField BlAreaField SiteId SiteCode MapTheme MapLegend MapLayerAlias MapLayerPoint MapLayerLink MapLayerNetwork
Following are typical configuration files, with Map Compiler settings for the test data supplied with the SISfm web application at its default web site location:
<?xml version="1.0"?> <configuration> <appSettings file="C:\inetpub\wwwroot\SISfm\shared.config"> <add key="CadcorpLicenceServer" value="" /> <add key="CadcorpLicenceLevel" value="Modeller" /> <add key="DataFolderSis" value="C:\inetpub\wwwroot\SISfm\test\sisdata\" /> <add key="DataFolderMap" value="C:\inetpub\wwwroot\SISfm\test\mapdata\" /> <add key="DataFolderMapIcon" value="C:\inetpub\wwwroot\SISfm\test\mapicons\" /> <add key="MapDatasetFolder" value="" /> <add key="UploadWebsite" value="" /> <add key="UploadAuthTokenUrl" value="" /> <add key="UploadAuthClientId" value="" /> <add key="UploadAuthClientSecret" value="" /> </appSettings> </configuration>
<?xml version="1.0"?> <appSettings> <add key="AppConfigFile" value="shared.config" /> <add key="DataFolderSis" value="~/test/sisdata/" /> <add key="DataFolderMap" value="~/test/mapdata/" /> <add key="DataFolderMapIcon" value="~/test/mapicons/" /> <add key="MapDatasetFolder" value="" /> <add key="MapCompilerGeognoSIS" value="http://localhost:4601/GeognoSIS/GeognoSIS.wsdl" /> </appSettings>
<?xml version="1.0"?> <appSettings> <add key="NolFile1" value="C:\inetpub\wwwroot\SISfm\test\sisdata\test.nol" /> <add key="DwgTemplateSwd" value="C:\inetpub\wwwroot\SISfm\test\sisdata\DwgTemplate.swd" /> <add key="DwgDataFolder" value="C:\inetpub\wwwroot\SISfm\test\dwgdata\" /> <add key="DwgDataFolderAfm" value="C:\inetpub\wwwroot\SISfm\test\dwg_afm\" /> <add key="DwgDataFolderAfmFlat" value="FALSE" /> <add key="DwgDataFolderForOverlay1" value="" /> <add key="DwgInsertParams" value="" /> <add key="DwgGrossAreaType" value="BOTH" /> <add key="DwgGrossAreaLayer" value="Gross Areas" /> <add key="DwgRoomAreaLayer" value="Space" /> <add key="DwgRoomNumberLayer" value="Room Numbers" /> <add key="DwgSaveSwd" value="FALSE" /> <add key="OverlayExclude" value="route-vehicle,route-pedestrian" /> <add key="OverlayLinks" value="buildings,carparks,otherlinks,space" /> <add key="ExplodeShapes" value="TRUE" /> <add key="ExportSVG" value="TRUE" /> <add key="ExportSVGZ" value="FALSE" /> <add key="ExportPDF" value="TRUE" /> <add key="ExportCentroids" value="TRUE" /> <add key="PDFPrintTemplate" value="IFM A3 Landscape PDF" /> <add key="PDFPaperFormat" value="A3*@600" /> <add key="PDFParameters" value="" /> <add key="ViewRotationAttribute" value="" /> <add key="BuildingName" value="" /> <add key="LinkColours" value="" /> <add key="LinkAttribute" value="" /> <add key="DescAttribute" value="" /> <add key="LocCodeAttribute" value="" /> <add key="MapFloorLayerPointParams1" value="Room Zones|db=2+tables=RoomZones,RoomZones,RoomZones,RoomZones,RoomZones,RoomZones,RoomZones,RoomZones+columns=map_name,x,y,scale,angle,icon,link,description+where=map_name='$$map_name$$'+nFieldX=1+nFieldY=2" /> <add key="MapFloorLayerPointParams2" value="HAZMAT|db=2+tables=hazmat,hazmat,hazmat,hazmat,hazmat+columns=hazmat_id,x,y,name,notes+where=site_id='$$site_id$$' AND bl_id='$$bl_id$$' AND fl_id='$$fl_id$$'+nFieldX=1+nFieldY=2" /> </appSettings>
Map Compiler obtains two extents from the SWD for use by Map Enquiry:
The view rotation is ignored for a site plan SWD but is compiled as the Map Enquiry building alignment for a floor plan SWD so that floors can be viewed orthogonally, when it must be the same for all floors of a building. The view rotation is as defined by the Cadcorp SIS View / Map Views / Rotate command unless setting ViewRotationAttribute is set.
Overlays can be renamed or excluded by using MapLayerAlias settings. In the resulting names, the dot (".") character is interpreted as a folder path separator. Note that overlay names should not be the same as folder names (i.e. if there is an overlay named A.B.C there should not be overlays named A.B or A.
The last separator in a folder path may instead be a double dot ("..") to signify that such overlays are alternatives: their selection will use radio (option) buttons instead of checkbox buttons (or equivalent button styles).
Overlay names matching the values in the setting OverlayLinks are processed as containing items with links to buildings for a site plan SWD, with links to rooms for a floor plan SWD, and in both cases with optional links to other external resources.
For a links overlay, only Point, Node, LineString, Link, Polygon, MultiPoint, MultiLineString, MultiPolygon items are processed. For area items, the item origin determines the Map Enquiry label position. In a links overlay:
Symbol name | Icon file name |
mapicons.Info | Info.gif |
mapicons.WiFi.AccessPoint-png | WiFi/AccessPoint.png |
An Open Geospatial Consortium (OGC) Web Map Service (WMS) overlay can be included, e.g. to display aerial photography. Its connection details must also be specified in the MapOgcWmsUrl or MapLayerOgcWms setting.
Map Enquiry does not explicitly support raster overlays, however it is possible to implement one using a point item with a large icon.
If the overlay dataset type is View Points, and overlay attribute DbConnectionMap& exists, it is processed as a real time overlay: the View Points database details are compiled and Map Enquiry obtains its content from the database specified by the corresponding DbConnectionMap setting, or if DbConnectionMap&=0 by the DbConnectionIFM or DbConnectionAFM setting. The following optional database columns are specially interpreted:
scale | point icon scale:
|
angle | point icon angle (clockwise degrees from horizontal), 0 if absent or null |
icon | point icon file name, Pin.gif if absent or null |
link | point hyperlink URI (or plan:loc_code as above), none if absent or null |
description | point description, shown in point dialog by default, found by Local Search. |
Table and column names may not contains spaces, but may be in any alphabetic case.
MapLayerPoint settings must be used to declare View Points overlays. These may optionally define a key column name, a description column name, and default values for other special table columns if these are undefined or do not exist.
The following additional View Points features are available:
Room zone layers (see MapRoomZoneLayer) must have description values commencing rm_id-zone_no if either the MapRoomZoneDialogAdvanced or the ModuleWorkstationBookings function is accessible. This is normally achieved using SQL in a MapFloorLayerPointView setting.
For all other overlays:
Use Compile DWG Floor Plans to compile floor plans from Archibus DWG files to SISfm (without requiring SWD files). These DWG files include xData for linking elements such as room numbers and polylines to Archibus, and from this xData SISfm room location codes are derived. These DWG files are accessed in the usual SISfm structure, specified by the DwgDataFolderAfm setting, and named according to the rm.dwgname field for rooms on that floor.
During compilation, Map Compiler can also optionally first convert existing DWG files to Archibus DWG files. The existing DWG files are accessed in the usual SISfm structure, specified by the DwgDataFolder setting, and both are named with their SISfm floor location code. There are two possible strategies for using this option:
Due to Cadcorp limitations, this option creates Archibus DWG files in DXF format. These DXF files must be opened using the Archibus DWG Editor (or AutoCAD) and saved as DWG files, whereupon the DXF files can be deleted.
Since its release, this option has been found not to work, because Archibus requires the actual Entity Handles in the DWG to match those in the xData, and Cadcorp does not provide access to the Entity Handles of DWG datasets. We have retained this option in case anything changes. Meanwhile, IFM can supply AutoLISP to accomplish this function upon request.
Note that Map Compiler does not publish Archibus enterprise graphics. This must be done using the Archibus DWG Editor (or AutoCAD with the corresponding Archibus plug-in).
Compiling DWG floor flans requires the Map Compiler settings commencing with Dwg.
If DwgDataFolder is defined, its DWG files are processed as follows.
The SWD file specified by setting DwgTemplateSwd is loaded and:
The following messages may be issued in a dialog box, or to the log in batch mode:
Setting MapCompilerGeognoSIS is not defined
The MapCompilerGeognoSIS setting must be defined to use the web edition.
No Cadcorp SIS ActiveX Manager or Modeller licence is available
Check that Cadcorp SIS is installed, including one of these licences, to use the desktop edition.
Unable to access page (message)
Check that the UploadWebsite settiing is correctly defined.
Cadcorp library not found: filename
Check that filename exists, or adjust NolFile configuration settings.
The following messages may be issued to the console in batch mode:
Error creating specified log file filename
File name not specified
No value was supplied for the /LOGFILE parameter.
Error creating specified log file filename
message
The value supplied for the /LOGFILE parameter is invalid.
The following messages may be issued to the log:
MapCompiler parameters
Confirms the supplied command line parameters for batch compilation.
Invalid command line arguments: arguments
Command line arguments are not those required for batch compilation.
Invalid date/time value: value
Invalid /SINCE date value for batch compilation.
Invalid last run date/time value: value
The LastRun value in the key HKEY_CURRENT_USER\Software\VB and VBA Program Settings\IFM\SISfm Map Compiler is not a date (if value is (undefined), use /SINCE with a date value, otherwise remove this value from the registry).
Compiling map [ SWDs | DATASETs ] updated since [ last run at ] date
Confirms /SINCE action for batch compilation.
Select item to compile
The initial log panel message.
Select plan to compile
Select plans to generate data for
No value was specified for the button pressed.
No maps found
No rooms found
You have tried to compile an item or range of items which do not exist in the database.
filename.swd read
filename.dwg read
Advice that a plan compilation is starting.
filename.dwg added as overlay name
A DWG file overlay has been added when compiling a DWG file.
ERROR: Compiling DWG files with DwgDataFolder defined is not supported with UploadWebsite set
Check the DwgDataFolder and UploadWebsite settings.
ERROR: DWG dataset invalid: filename.dwg
DWG compilation was unable to read this DWG file.
ERROR: no dwgname value is defined for rooms on floor loc_code
ERROR: different dwgname values are defined for rooms on floor loc_code
DWG compilation obtains the names of Archibus DWG files from the rm.dwgname field for rooms on that floor, or from fl.dwgname if the floor has no rooms.
ERROR: DWG layer setting cannot be renamed to layer because it already exists
DWG compilation found that the layer GROS$, RM$ or A-ROOM-NO already exists, when setting DwgGrossAreaLayer, DwgRoomAreaLayer or DwgRoomNumberLayer is used.
WARNING: DWG layer RM$ contains count1 Polygon items, layer A-ROOM-NO contains count2 BoxText items
DWG compilation found a mismatch between the number of room polygons and their numbers.
ERROR: DWG layer RM$TXT already exists
DWG compilation found that the layer it creates for Archibus room numbers already exists.
ERROR: DWG layer GROS$ contains count Polygon items
DWG compilation found that the gross area layer does not contain either 1 or 2 polygons.
WARNING: DWG layer GROS$TXT already exists - renamed to GROS$TXT_OLD
DWG compilation found that the layer it creates for Archibus gross area labels already exists.
WARNING: DWG layer RM$ area [ at extents ] contains count room numbers [ list ]
DWG compilation found a room polygon which does not contain 1 room number. When no room number is found, extents are provided for locating the room, otherwise a room number list.
WARNING: DWG layer RM$TXT values not in rm.rm_id: list
DWG compilation found room numbers in the DWG which do not match any value of field rm.rm_id for this floor.
WARNING: Compiling DWG files with DwgViewRotationField defined is not supported with UploadWebsite set
Check the DwgViewRotationField and UploadWebsite settings.
WARNING: rm.rm_id values not in DWG layer RM$TXT: list
DWG compilation found values of field rm.rm_id for this floor which do not match any room number in the DWG.
WARNING: Unable to get room ID from DWG xData for count rooms
DWG compilation found invalid xData values.
INVALID SWD: Link overlay index contains items other than Point, Node, LineString, Link, Polygon, MultiPoint, MultiLineString, MultiPolygon
The SWD is compiled but unexpected results may occur.
INVALID SWD: Link overlay index contains count items with attribute='value'
INVALID SWD: Link overlay index contains items with attribute values not in the database: 'value,...'
INVALID SWD: Link overlay index does not contain building 'value' that is in the database
INVALID SWD: Link overlay index does not contain rooms with attribute values that are in the database: 'value,...'
The SWD is compiled but unexpected results may occur. On a site or floor plan, a BuildingLocCodeAttribute or LocCodeAttribute value does not specify a building or room that exists in the database, or vice versa.
INVALID SWD: Link overlay index contains more than one item for building 'value'
The SWD is compiled but unexpected results may occur.
INVALID SWD: Link overlay index contains items with no description, which is required for point layers
The SWD is compiled but unexpected results may occur. A MapLayerPoint setting specifies that the overlay is to be compiled as a point layer for. The overlay DescAttributeFormula$ attribute and the DescAttribute setting are used to determine item descriptions.
ERROR: Unable to copy filename to filename (message)
Check filing system permissions.
ERROR: Unable to export to filename (message)
Check filing system permissions.
ERROR: cannot export width x height PNG: filename
Check filing system permissions. Check ExportFloor PNG scale.
ERROR: file does not exist: filepath
You have tried to compile an item which exists in the database, but its Cadcorp SWD file or Archibus DWG file is not present.
ERROR: file filename does not exist under folderpath
You have tried to compile an item which exists in the database, but a search for its Archibus DWG file has not found it.
ERROR: n files filename exist under folderpath
You have tried to compile an item which exists in the database, but a search for its Archibus DWG file has found more than one.
ERROR reading item (WriteLayerXml): message
An unexpected error occurred, consult IFM for assistance.
WARNING: Manager licence in use, and Insert items found - not exploded or simplified for SVG
A Cadcorp SIS ActiveX Modeller licence is required to process Insert items correctly.
WARNING: Manager licence in use, and Point items found - symbols not exploded
A Cadcorp SIS ActiveX Modeller licence is required to process Point items correctly.
filename created
Advice that PDF, DWG, SWD, SVG, XML and image files have been created or replaced.
Overlay building_floors..N added
Advice that for a site plan an overlay has been added for building_floors level N.
Uploading to upload_website
Advice that file uploading is commencing.
filename uploaded
Advice that a file has been uploaded.
n plan[s] generated
n file[s] generated
Summary of the plans and files generated.
Compiling building data is not supported with UploadWebsite set
Check the UploadWebsite setting.
filename created, n buildings
Summary of the building data generated while compiling a site plan.
Compiling floor data is not supported with UploadWebsite set
Check the UploadWebsite setting.