ArcFM Desktop Overview > ArcFM Overview > Login Objects |
ArcFM uses several tables to store persistent information that is used to configure the ArcFM environment. These data include snapping environment settings, stored displays, page templates, and documents. In order to use these features, you must login to an ArcFM System Database - a database that contains these system tables. When ArcMap starts, ArcFM provides a default login interface that prompts the user for the connection information necessary to login to a system database. There are some cases where this login process could be customized or bypassed altogether. The login process is controlled by the ArcFM Properties Extension. When ArcMap starts, the ArcFM Properties Extension reads connection information (which will be the last connection used) from the registry to use as default connection information for the system login. After this is done, the Login() method is called on the IMMLogin interface. This method is also called by the login button on the ArcFM Solution toolbar. At this point, a login object is required to collect the necessary connection information so that a login can be established. The MMDefaultLoginObject provided with ArcFM performs this task. The default login object can be replaced by your own custom login object. The IMMDefaultLoginObject interface may be used to override the settings in MMDefaultLoginObject. |
|
||||||||
How Login Objects Are UsedWhen ArcMap starts, a component called the ArcFM Properties Extension is started. In ArcMap, the Properties Extension is the centerpiece of ArcFM - it performs various initialization tasks for ArcFM. One task is connecting to an ArcFM system database, which it does by providing the user with a login dialog with which he or she will enter the required connection information. Logging into a system database provides access to ArcFM’s stored displays, page templates, documents, and favorites manager tools. Without the system database connection, these tools would be disabled. The ArcFM customization framework allows the creation and use of custom login objects that might better fit the way that your organization uses ArcFM. For example, you might have an elaborate automatic plotting application based on ArcMap that does not require a login to an ArcFM database. In this case, you would not want to halt the process while ArcFM prompts the automated application for a username and password. In some cases, you might want to silently connect to a test database and restrict any logins elsewhere. These requirements can be satisfied by developing custom login objects. Note that while a custom login object will typically have a user interface, the use of one is not necessary. The login process could be automated in such a way that any user interaction would not be needed. This might be the case for enforced logins to testing or training environments. How Login Objects Are LoadedOne of the first tasks that the ArcFM Properties Extension performs is connecting to an ArcFM system database. Typically it does this by issuing the standard ArcFM Login dialog. If a custom login object is to be used, it can be loaded and issued at this point instead of the standard login form. The Properties Extension checks the computer’s system registry for a custom login object. This registry setting is added by the implementer of the custom login object. If the Properties Extension finds that a custom login object is specified in the registry, it will load the custom object and bypass the standard login form. If a custom object is not specified, then the standard login form will be shown as usual. |
|||||||||
Process Framework (Desktop Only): The IMMAdoConnection interface allows you to create a custom login object that logs into the Process Framework as well as ArcMap without requiring the user to login twice. Implement IMMAdoConnection if you wish to combine the logins for Process Framework and ArcMap in your custom login form.
Implement Your Custom Login Object
When ArcFM loads, the ArcFM Properties Extension checks the registry to find whether or not a custom login object has been specified. If not, ArcFM will use the default login object. So, in order to use your new custom login object you will need to create a new registry key and value. This value will specify your custom login objects program ID (progID). For ArcFM Viewer for ArcGIS Engine logins, the Properties Extension looks for the custom login object’s progID in the following location: HKEY_LOCAL_MACHINE\SOFTWARE\Miner and Miner\ArcFM Viewer for ArcGIS Engine\Login If you're implementing a custom login object using ArcFM Desktop, the Properties Extension looks for the custom login object's progID in the following location: HKEY_LOCAL_MACHINE\SOFTWARE\Miner and Miner\ArcFM8\ArcFMLogin The string value under the Login key will be named LoginObject and will contain the progID for the custom login object. With this value specified in the registry, ArcFM Desktop or ArcFM Viewer for ArcGIS Engine will now use your custom login object upon loading.
Implement Your Custom Login Object on a 64-Bit MachineIf you're implementing a custom login object on a 64-bit machine, the process is slightly different. Open the registry and browse to the following location: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Miner and Miner\ArcFM8\ArcFMLogin. At this location create a registry key with a data type of Text and name it "LoginObject". Modify the value of this key to be the progID of your custom login object. Alternately, you can use a script (*.reg file) to create and install this registry key. In the sample script below "CustomLoginObject.CAFMLogin" is the progID of the login object.
If you create this script in a text file, ensure the file has an extension of .reg (not .txt). Double-click the *.reg file to create the registry key on the local machine. |
|||||||||
Mobile and the Login ObjectPrevious releases of the ArcFM Solution included radio buttons on the Login screen that allowed Mobile users to specify Enterprise and Field databases. With the release of 9.3.1, these radio buttons have been removed. You may restore this option to your login screen using the ShowMobileRadioButton registry key. In the Registry, browse to HKEY_LOCAL_MACHINE\SOFTWARE\Miner and Miner\ArcFM8 and look for the ShowMobileRadioButton key. If it doesn't exist, create it as a D-WORD value. Right-click it and select modify. Set the value to 1 to display the Mobile options. By default, this value is set to 0 which hides these options. |