This paper describes a software tool for construction of a virtual environment with force feedback. A haptic interface is implemented in various mechanical configurations. In most cases, the software of the virtual environment is tightly connected to the control program of the haptic interface. This problem is a hazard for development of further applications. We developed a modular software tool called LHX, which supports various types of haptic interface. LHX is composed of seven modules. Application of the haptic interface is easily reconfigured by exchanging these modules. The software also supports a user environment which includes haptic icons. The effectiveness of LHX is exemplified through various applications.