Facilities Management Web Browser

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

 

Microsoft Corporation

June 2000

Summary: This article describes how to install and use the Microsoft Visio Facilities Management (FM) Web Browser with emphasis on using the FM Web Browser and its files to publish facilities drawings and information on an intranet. (9 printed pages)

Download Fmweb.exe.

Contents

About the FM Web Browser System Requirements FM Web Browser Files Provided in the Preview Version  Installing the FM Web Browser and Sample Files Using the FM Web Browser Installing the FM Web Browser on a Web Server Using the FM Browser Control Using the FM Drawing Viewer Control

About the FM Web Browser

This is a preview version of the Microsoft® Visio® Facilities Management (FM) Web Browser application. You can use the FM Web Browser to publish facilities drawings and related information on your intranet for fast and easy user access.

What the FM Web Browser Preview Includes

  • A sample facilities drawing and database. The data used to publish this sample was created using the Facilities Management solution in Microsoft® Visio® 2000 Technical Edition.
  • A utility to convert your own Visio drawings and facilities database into a format that the FM Web Browser can display.

FM Web Browser Features

  • Browser window. Displays facilities data in a tree control that resembles the Visio CAFM Explorer in the Facilities Management solution.
  • Drawing window. Displays the drawing and location of a selected item in the FM Web Browser.
  • Properties window. Displays detailed data for a selected item in the FM Web Browser.
  • WebExport utility. Exports Microsoft Visio Facilities Management drawings into metafiles and XML data used by the FM Web Browser.

Many of the FM Web Browser features are implemented in the Microsoft® Visual Basic® Scripting Edition and can be configured to meet your needs.

**Note   **Because this is a preview version of the FM Web Browser, it is not supported by Microsoft Product Support Services.

The example companies, organizations, products, people, and events depicted herein are fictitious. No association with any real company, organization, product, person, or event is intended or should be inferred.

System Requirements

  • Microsoft Visio 2000 Technical Edition or Microsoft Visio Technical 5.0 Plus
  • Microsoft Internet Explorer, version 4 or 5.x

FM Web Browser Files Provided in the Preview Version 

File Name Description
FmWeb\ReadMe.htm Readme file for this preview
FmWeb\Default.htm Home page
FmWeb\FM-Browser.htm Browser window
FmWeb\FM-Properties.htm Properties window
FmWeb\FM-PropertiesScriptlet.htm Scriptlet to retrieve facilities properties
FmWeb\FM-TabScriptlet.htm Scriptlet to display tabbed dialog window
FmWeb\FM-Viewer.htm Drawing Viewer window
FmWeb\Drawings\*.emf Sample facilities drawing (metafile)
FmWeb\Drawings\*.xml Sample facilities drawing data
FmWeb\Images\Property.gif Display properties button
FmWeb\Source\Browser.cab Visio facilities database browser control setup file
FmWeb\Source\Viewer.cab Visio Drawing Viewer control setup file
FmWeb\Source\Floor 5.mdb Sample facilities drawing
FmWeb\Source\FM-Sample.mdb Sample facilities database
FmWeb\Source\A Works.mdb Sample external data (FM-Sample.mdb links to this database)
FmWeb\Source\A Works.dsn File data source name (DSN) for A Works.mdb
FmWeb\Export\WebExport.exe Utility to export facilities database and drawing for the Web components
FmWeb\Export\Help.rtf Help file for WebExport.exe
FmWeb\Export\WebExport.reg Registry preferences for WebExport.exe

Installing the FM Web Browser and Sample Files

Use the following procedures to install the FM Web Browser and sample files, and set the appropriate security level for Microsoft Internet Explorer.

To Unzip the Preview Files

  1. Open the file FMWeb.exe.
  2. Specify the location, such as C:/, to which you want to extract the FM Web Browser preview files.

To Set the Security Level for Internet Explorer

  1. Start Internet Explorer.
  2. Click Tools, and then click Internet Options.
  3. Click Security, and then click Local intranet for the Web content zone.
  4. Set the security level to Low.

When you access the Default.htm Web page, the browser registers the controls used by the FM Web Browser. After the controls are registered, you can set your browser’s security level back to its original setting.

Using the FM Web Browser

To run the FM Web Browser, double-click Default.htm to open the default Web page in Microsoft Internet Explorer.

Browser Window

  • Click any [+] symbol in the tree control to view the items under it.
  • Click an item in the tree control to display the drawing and locate it in the drawing window.
  • Click the Get Properties button (the business card icon below the tree control) to display data for the selected item in the tree control.
  • Click Find to search for an item by property. Select the category of item, and then enter the text you want to search for. To locate the shape associated with an item, click the item in the results list.

Drawing Window

When a drawing is displayed, left-click to zoom in, and right-click to zoom out. Use the scroll bars to pan the drawing.

Properties Window

  1. With an item selected in the tree control, click the Get Properties button to display the properties window.
  2. Click a tab to display data for the category.

Installing the FM Web Browser on a Web Server

You can display facilities plans that you have created with the Facilities Management solution in Microsoft Visio 2000 Technical Edition or Microsoft Visio Technical 5.0 Plus on your company's intranet by installing the FM Web Browser components on a Web server.

To view your own facilities plans and facilities database with the FM Web Browser, you must export your plans and database into a format that the FM Web Browser can read and display.

The FM Web Browser components consist of the following two OCXs and HTML pages.

  • FM Browser control (WebBrowser.ocx), which enables browsing and searching in a Facilities Management database.
  • FM Drawing Viewer control (WebDrawing.ocx), which displays a metafile of the selected Visio page and a location arrow to indicate the position of a facilities object (person, space, printer, and so on).
  • Default.htm which is the frames page that displays the following HTML pages.
    • FM-Browser.htm, which contains the FM Browser control.
    • FM-Viewer.htm, which contains the FM Drawing Viewer control.
  • FM-Properties.htm, which displays the properties of a selected item. FM_Properties.htm uses the following HTML scriptlets.
    • FM-TabScriptlet.htm, which formats the properties and displays a tabbed-dialog view.
    • FM-PropertiesScriptlet.htm, which looks up the properties from the database.

To Install the Components on a Web Server 

  1. Copy the HTML files and images to a folder under your Web server’s root folder.

    **Important   **Do not alter the subfolder structure under the FMWeb root folder.

  2. Edit FM-Browser.htm and modify the DataSource attribute of the FM Browser control to the correct database connect string.

    Also, remove or comment out the following line from the window_onLoad() event. This line was added to make the sample files work easily:

    FMBrowser.dataSource = FindPath + "FM-Public.mdb"
    

    **Note   **The database connect string must point to a file resource (on a local server) to which all users have read and file-scan privileges. The connect string cannot point to an HTTP or FTP site.

  3. Add a hyperlink from one of your Web pages to FmWeb\Default.htm.

To Export Your Facilities Plans and Database 

  1. In the Export subfolder of the FM Web Browser folder, double-click WebExport.exe.

  2. For Data Source, select the data source name (DSN) of the Visio facilities database you want to export.

  3. To create a public copy of your database for use with the FM Web Browser, select Copy To. Type the location for the copied database or select a DSN from the list.

    For more information about these options, click Help in the Visio FM Drawing Export dialog box.

  4. For Save Drawing In, type the location for the exported drawings. If you are publishing your drawings on your intranet site, type the file path of the folder on your Web server.

  5. Click OK to export your facilities plans and database.

Using the FM Browser Control

The FM Browser control (WebBrowser.ocx ) makes it possible for you to browse and search in a Visio facilities management database. The control can be inserted into an HTML document using the Object tag.

**Note   **Do not insert multiple FM Browser controls into a single Web page or in a host instance. If more than one FM Browser control is placed on a Web page, they may interact unpredictably or fail when you try to print the page. 

Properties

Property Description
DataSource ODBC (Open Database Connectivity) connect string for the facilities management repository database.
Mode Tab control setting.

Valid settings are Browse or Find.

SelectedPage Repository object ID of the current drawing page (read-only).
SelectedItem Repository object ID of the selected item in the tree control (read-only).
SelectedShape Unique ID of the Visio shape associated with the selected item (read-only).
ShowFolders Display or hide folders for people, assets, spaces, boundaries, and departments in the tree control.

Events

Event Description
OnFmDataSourceChange The control has connected to a data source. This is fired when the control is initialized (HTML attribute tag) and when the control’s DataSource() method is invoked by an Automation client.

This event returns the ODBC connect string.

OnFmPageChange The drawing page has changed for the selected item in the tree control. This is fired when the user clicks an item in the tree control that is not contained on the current drawing page.

This event returns the repository object ID of the new page.

OnFmSelChange The selected item in the tree control has changed.

This event returns the repository object ID of the item.

OnFmShapeChange The selected item in the tree control has changed.

This event returns the unique ID of the Visio shape associated with the item.

Sample HTML tag:

<p>
<OBJECT classid="clsid:811D5F9E-F697-11D2-A25B-006008B03FDE"
id="FMBrowser" height="300" width="200" left="20" top="20">
   <param name="DataSource" value="C:\FmWeb\Sample.mdb">
   <param name="Mode" value="Browse">
   <param name="ShowFolders" value="True">
</OBJECT>
</p>

Sample event handler:

<script language="VBScript"><!—
   sub FMBrowser_OnFmDataSourceChange(strConnect)
   Call OpenDb(strConnect)
   end sub

   sub FMBrowser_OnFmPageChange(strPageID)
   ‘tell the drawing viewer to download the new drawing
   FMViewer.DrawingURL = "Drawings\" & strPageID
   end sub

   sub FMBrowser_OnFmShapeChange(strShapeID)
   ‘tell the drawing viewer to locate this shape
   FMViewer.Locate = strShapeID
   end sub

   sub FMBrowser_OnFmSelChange(strObjectID)
   ‘display database properties for this item
   Call ShowProperties(strObjectID)
   end sub

--></script>

Using the FM Drawing Viewer Control

The FM Drawing Viewer control (WebDrawing.ocx) displays a metafile of the selected Visio page and a location arrow to indicate the position of a facilities object (for example, person, space, or printer).

The drawing metafile (EMF) and shape position data (XML) are downloaded from the host Web server when the DrawingURL property is invoked. This is typically called from Visual Basic Script or JavaScript by adding an event handler for the FM Browser control’s OnFmPageChange event.

The control first attempts to find a local copy of the metafile in the Internet cache folder on the client computer. If the control cannot find the metafile (or if the local copy is old) the control tries to download a compressed metafile (filename.emz) from the Web server to the Internet cache folder. If a compressed metafile is not found, the control downloads a standard metafile (filename.emf).

The Location method displays the location arrow and pans the drawing so the arrow is visible on the screen. This is typically called from Visual Basic Script or JavaScript by adding an event handler for the FM Browser control’s OnFmShapeChange event.

You insert the control into an HTML document by using the Object tag. 

Properties

Property Description
DrawingURL Gets or sets the drawing page to display. The control downloads the drawing metafile (EMF) and shape position info (XML) from the host Web server.

DrawingURL is the repository object ID of the drawing page.

Locate Displays the location of the item (on the current drawing page) given its Visio shape unique ID.
Zoom Sets the drawing zoom scale (integer 1% to 10000%).

Sample HTML tag:

<OBJECT classid=clsid:31C787C0-D0CA-11D2-B40F-006008B03FDE id=FMViewer    width ="500px" height="380px" left="10px" top="10px">
   <param name="DrawingURL" value="">
   <param name="Zoom" value="50">
</OBJECT>

Using Multiple Repository Databases

If you have more than one Facilities Management repository database, you can provide access to each database by adding an HTML button to FM-Browser.htm.

Example button:

<img alt id="imgNewDb" name="Connect" src="images/newDb.gif"
   style="cursor: hand; height: 32px; width: 32px" 
   title="Connect to another FM database.">

Example button event handler:

<script language="VBScript"><!—
   sub imgNewDb_onClick()
   FMBrowser.DataSource = "//SharedServer/Public/FmData.mdb"
   end sub
--></script>