This wiki has undergone a migration to Confluence found Here

RMIM Designer Documentation (Errors and Installation)

From HL7Wiki
Jump to navigation Jump to search
Overview   2010/11 Updates   VocabMIF   DataTypeReleases   BatchProcess   CommandLine   Errors/Install   Vis2002-3-7-10-13    

Error Messages ·  Install Instructions ·  Visio Error #2131 or error 128:  ·  CompileErrors: (SystemCleanUp ·  Re:MsComctl.ocx ·  Automation error ·  InstallREPAIR)  ·  VBA Run-time errors ("Unknown Class Type" Errors)

Error Message Solutions

Click on the following links for solutions to particular error messages:

Installation Instructions

Installation instructions for RMIM Designer in Visio are maintained in a tools-installation page - Installing_and_Configuring_HL7_Tools - on the Wiki. They are hyper-linked from here for completeness. Specifically:

Jump to top of page

Visio Internal Error #2131(in vis2003) or error 128(in vis2010)

Starting in the Autumn of 2011, we received occasional reports of Visio issuing one of the two following errors:


This error only appears when one tries to initiate a "new" RMIM Design by opening Visio and selecting to create a "new" design based on the RMIM2 template. Interestingly, it does not affect the ability to open and process an existing design.

The source of this error is the HL7 "template" file "RMIM2.vst" whose sole function is to establish a link between the new drawing and the RMIM Designer "stencil" file "RMIM2.vss". The template file has been in use and unchanged for at least six years. It is likely that one of the recent Windows "Updates" made a change to Visio that now detects this file to be "corrupt".

If you run into this problem, the solution is simple. Do the following:

  1. Close Visio (if it is open).
  2. Open Visio without designating an existing drawing file.
  3. Open file RMIM2.vst from your "HL7" solutions directory under "MyShapes" in Visio 2003, 2007, 2010
    • When the RMIM designer asks you to select a RIM to open, click Cancel, Cancel and OK until it stops asking.
  4. On the Visio file menu, select File: Save.
    • Note: Because the source file was created in Visio 2002, you will be asked to choose a "format" as shown in the panel at right. Either selection ("Current Visio Format" or "Visio 2002 Format") will work, but the latter takes rather more time to save.
  5. Close Visio

That's it. You should be able to initiate a new diagram from the RMIM2 template.

A future release of the RMIM Designer will include the automatic inclusion of an updated file in order to (attempt to) circumvent this non-error error.

Jump to top of page

"Compile Error: Can't find project or library" on initial opening of RMIM Designer

Using Visio from a 64-bit Office Release?

This error appears when a user attempts to run HL7 RIMIM Designer on a 64-bit Vision release. This is not supported.

Check Have Latest RoseTree Installation


Did you get something like this when you first opened the RMIM Designer in Visio? If so, this is usually an easy error to fix.

Over 90% of the time, this error arises because your RoseTree installation has a version older than the version the RMIM Designer was compiled with. (Or RoseTree is not installed at all.)

Therefore the recommended first attempt to fix should be:

  1. Close the Visio code window (shown) and Visio itself.
  2. Download the latest (and greatest) release of RoseTree from Gforge.
  3. Run the new RoseTree installer and select to Remove RoseTree
  4. Run the new RoseTree installer a second time to reinstall RoseTree

Try the RMIM Designer in Visio again. The problem should be solved.

If this does not fix the problem, there are two alternatives to try. The first is system cleanup of your system for files that may be causing this error, as documented by Microsoft. The second installation repair is more arduous and involves "re-linking" the Visio RMIM Designer code.

Jump to top of page

System Clean-up

The following solution was found by Joginder Madra of HL7-Canada. His posting on Gforge said:

Something to add to the documentation or keep in mind should someone else be affected by invalid object libraries or missing references.
When opening RMIM Designer, I would receive a message such as "Object library invalid or contains references to object definitions that could not be found". Following the steps in the installation documentation - particularly those dealing with installation errors - I was not able to resolve the issue.
That is until I deleted some stray exd files as per: and (see Known Issues section in kb article).
Basically, one would need to delete files with an exd extension in their:
  • Folder C:\Documents and Settings\%USERNAME%\Application Data\Microsoft\Forms\ (on Windows XP), or
  • Folder C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Forms\ (on Windows 7 or Vista)
Once I did this, I no longer had this problem with RMIM Designer.

According to these files became invalid with a Microsoft update to VB run-time files that occurred recently. Deleting the files will cause them to be re-generated correctly the next time they are needed. Or, to quote the Microsoft Knowledge Base article:

"To resolve the problem, delete cached versions of the control type libraries. To do this, search the hard disk for “.exd,” and then delete all occurrences. The .exd files are re-created automatically by using the new controls the next time that you use VBA."
Jump to top of page

Solutions Related to MSComctl.ocx

In August 2012, a Microsoft Security update to ALL of the office suites affected the use of "Microsoft Common Controls" which are reusable application components distributed as "mscomctl.ocx". Although the security patch was intended to update this file, it apparently caused numerous VB and VBA applications fail.

In November 2012, we received two reports of apparently related problems that appeared when using The HL7 RMIM Designer which uses these controls for its own forms. The failures were different:

  1. Was an installation on a new Windows 7/64 bit system. In this case, the Visio RMIM Designer VBA code could not find the controls because they were being installed in the wrong Windows sub-directory.
  2. Was a presentation seen by many other users of other applications, and has to do with incorrect registration of the control. The user reporting this said "I opened up a Visio Diagram I had been working with a few months back and got a compile error when I tried to open the properties tab. I hadn’t installed any new HL7 tools, and so was pretty sure something else was wrong..."

Preliminary Solution for #1 Above

In an attempt to correct the first case, an update was made to the the Windows installer (*.msi) used to install RoseTree. (RoseTree is a prerequisite installation to RMIM Designer.) Starting with RoseTree rlease 5.0.20, the installer undertakes a more direct installation of the "ocx" file.

The correction involves uninstalling RoseTree and re-installing it with release 5.0.20 or later.

This change solved the immediate problem that had been reported. It is also possible that uninstalling RoseTree and re-installing with release 5.0.20 or later will also address the other problem.

Alternate Solution for #2 Above

If you see a similar occurrence, I recommend a two-step approach:

  1. Actually six sub-steps for the first step:
    1. Uninstall your current RMIM Designer Installer (This can be done by running the installer and selecting "Remove");
    2. Uninstall your RoseTree installation (This can be done by running the installer and selecting "Remove");
    3. Install RoseTree with an installer downloaded from Gforge for release 5.0.20 or later;
    4. Install the RMIM Designer Installer from the latest Gforge download;
    5. Run the RMIM Designer Installer to finish installation of the RMIM Designer in Visio; and
    6. Attempt to run the RMIM Designer by opening Visio and loading the RMIM2 stencil. If you do not receive a "compile error" the update has probably been corrected.
  2. If after the above steps you still have problems:
    1. Please report the error on the RMIM Designer Gforge tracker, including:
      • The error message you got;
      • At which step of running the RMIM Designer did the error appear;
      • Which OS are you running and is it 32 or 64 bit;
      • which releases were you using of Visio, RoseTree, and RMIM Designer;
    2. Attempt a repair following the steps outlined in the Microsoft Knowledge Base article about this issue. Note that the article refers to Office 2007 in its title, but a similar page has been issued for several Office release. Also the article includes three different ways to address this.
Jump to top of page

Installation REPAIR

In circumstances where the installation does not yield the expected version (from menu HL7…About), or where an attempt to initiate a new RMIM2 drawing produces an error message of "Can't find project or library" it is recommended that the following procedures be followed. These assure a "clean" installation and provide de-bugging steps, in the case the error message recurs.

Step A) Uninstall and removal of previous files

  1. Uninstall the current "HL7VisioInstall" program by either:
    1. Running the latest VisioInstall... MSI file, and selecting "Remove" (or)
    2. Use the ControlPanel Add/Remove Programs to Remove the "HL7VisioInstall" application
  2. Remove support directories. In directory "C:/Program files/HL7/HL7VisioInstall" you may find one or more sub-directories with names that begin with "pending" or "installed". Delete these directories.
  3. Remove all installed components in the Visio "solutions/HL7" directory
    1. This directory is under "C:\Program files\Visio\" (for Visio 2000) or under "C:\Program files\Microsoft Office\Visio10\" (for Visio 2002)
    2. There may also be an intervening "Language" directory (1033 for English) beneath Visio and above "Solutions"
    3. In ....Solutions\HL7 remove all files. If you have placed a design repository in this directory, you can leave that in place.
  4. Uninstall the current "RoseTree" program by either
    1. Running the latest RoseTree... MSI file, and selecting "Remove" (or)
    2. Use the ControlPanel Add/Remove Programs to Remove the "RoseTree_II" application

Step B) Installation of new software:

  1. Run the RoseTree.msi installer to install RoseTree_II
  2. Run the current VisioInstall_<someDate>.msi file to install the HL7VisioInstall program.
  3. Run the HL7VisioInstall program from your "Start" menu
    1. The program will first open Visio (to find the solutions directory) and then will re-close Visio.
    2. The Install program will present the Solutions directory, its selection for the "version" of Visio and will ask you to enter the path for a design repository
    3. Be CERTAIN that the correct version of Visio is selected, and provide a repository path.
    4. Click "Install" -- You will be warned to close Visio -- and then installation proceeds.
    5. Close the installation dialog with the "X" button (upper-right).

Step C) Finishing installation (and testing) the RMIM designer in Visio

  1. Open Visio.
  2. Select to start a "New" drawing based on "HL7/RMIM2"
    1. Visio 2002 lists a set of categories, and you will find "RMIM2" under the HL7 category
    2. In both Visio 2000 and Visio 2002, you can use menu selection: File...New...Hl7...RMIM2
  3. If prompted, select to "Enable" macros
  4. NORMAL action is to see a message saying that a new menu (mnu) file has been created and that you must restart Visio to use the menu. – CELEBRATE
  5. ABNORMAL action occurs with a message like "Can´t find project or library" In this case, scream angry words, then follow "Correcting compile errors" (below)

Step D) Correcting compile errors

  1. In about 1 of every 12 installations, there is a failure that shows up as an error message "Can't find project or library" when you first open Visio. This is a result of a failure of the Visio installation to connect to either the RoseTree dlls, or the MSXML dll. This is curable.
  2. Get into the Visual Basic debugger by
    1. Press "Ctrl-Break" when the error message occurs and then close the error dialog box
  3. In the Visual Basic debugger ("Microsoft Visual Basic" appears in the title bar), stop execution by selecting menu "Run...Reset"
  4. Select "RMIM_stencils" in the Navigation pane. The Navigation pane is at the left, and has two Major headings -- "RMIM_stencils" and "RMIM_template". Click on the heading "RMIM_stencils"
  5. Open the References dialog by selecting menu "Tools...References". This will display a dialog box with "References - RMIM_stencils" in the title bar. A graphic of this dialog when there are NO problems follows:
  6. Review these entries for anomalies as:
    1. The top seven entries should all be checked, and the seventh should begin "Microsoft Visual Basic for..."
    2. The next several entries should all begin "HL7- inMemRtTree" followed by -- "HMD", "RIM", "RMIM", "Suppt", "Ctrl"
    3. The next entry should be "Microsoft XML, v4.0"
    4. The next entry should be "CicUtility"
    5. The next (and final) entry should be "Microsoft HTML Object Library"
  7. An anomaly occurs when one or more of these entries is labeled as "MISSING". The resolution depends upon which grouping (above) is missing.
    1. Failure in group (a), (d) or (e) has NOT occurred before. If you see this, please contact GW Beeler
    2. Failure in group (b) -- be CERTAIN that RoseTree was installed, if it was, go to step 8, otherwise install RoseTree and re-try Visio
    3. Failure in group (c) -- be CERTAIN that MSXML 4.0 was installed, if it was, go to step 8, otherwise install MSXML 4 and re-try Visio
  8. To correctly link the "missing" DLLs, you will need to: "de-select" the "missing" entries; close the References dialog; re-open the references dialog; find and select the proper DLLs; close the dialog; test by compiling; and save the file. The steps are as follows:
    1. Note which references are "MISSING"
    2. De-select (un-check) the "MISSING" references.
    3. Close the References Dialog by clicking its "OK" button
    4. Re-Open the References dialog by selecting menu "Tools...References"
    5. Find the first needed reference. These are listed in alphabetic sequence in the dialog box.
      1. For group (b) (above) they should have the names that start "HL7- inMemRtTree...." (as above).
      2. For group (c) (above) the listing is "Microsoft XML, v4.0" (as above).
    6. Verify the "location" for group (b) files. When you click on the "found" file, the "Location" will appear in the bottom of the dialog box. The location should be a "dll" file in "C:\Program files\HL7\RoseTree\"
    7. Select the found reference by checking it.
    8. Repeat steps 8.5 - 8.7 for any remaining "MISSING" references
      1. Close the dialog box by clicking its "OK" button
    9. TEST the references by selecting menu "Debug...Compile RMIM_stencils" -- AND hope fervently that there are no error messages. If all references were resolved the compilation should complete with NO messages at all.
    10. If there are still errors, go back to step 5
    11. If the compilation was successful, SAVE your work by choosing "File...C:\Program.....RMIM2.vss" (The third entry in the File menu.)
    12. Close the Visual Basic editor with menu "File...Close and return to Visio"
    13. Close Visio and Restart -- All should be well!
Jump to top of page

"Compile Error: Automation error" on initial opening of RMIM Designer

This error arises from the inability of the RMIM Designer software to link to a "common" set of components supported by Visio. To date, its primary occurrence arises from a Microsoft-distributed security patch during the spring/summer of 2012 that "broke" the link in the Windows registry registry to the "Common Controls." The approach to correcting this error is documented separately from this page.

Jump to top of page

VBA Run-time errors

The following are some of the error messages emitted by the RMIM Designer code (written in VBA)

"Unknown Class Type" Errors

If you should see an error message beginning "Unknown class type COCT_MT######UV## ..." when you extract the graphics from a Visio RMIM or validate an RMIM, the most likely culprit is a malformed cmetInfo.txt file in the installation location for your copy of the RMIM Designer. For most users, this will be C:Users\[CurrentUser]\My Documents\My Shapes\HL7\cmetInfo.txt.

To determine this is the case, open the cmetInfo.txt file and try to determine whether any of the descriptions are missing opening or closing quotes around the descriptive text. (Note, however, that no quotes around auto-generated text (such as 'Auto-generated.') is legal.

If you do find that your cmetInfo.txt file is malformed, you will need to get a good copy of this file. There is a source on Gforge in the Releases for project "Hl7 V3 Design Repository". The zip archive (named like "") contains a "cmetInfo.txt file" to replace the flawed one in your ...\MyShapes'HL7 sub-directory.

To verify that the issue has been corrected, launch Visio, select the RMIM2 template (and selecting an appropriate core MIF file), and then drop a CMET element anywhere on the template. If the 'Select CMET' dialog launches, then the issue has been resolved.

Jump to top of page