INFO: Visual Modeler 1.0 Frequently Asked Questions (FAQ)

ID: Q166395


The information in this article applies to:
  • Microsoft Visual Basic Enterprise Edition for Windows, version 5.0


SUMMARY

The following is taken from the Visual Modeler Frequently Asked Questions Help file supplied with the Visual Modeler product.


MORE INFORMATION

The following questions are covered by this article:

  1. What is Microsoft Visual Modeler?


  2. What is a model in Visual Modeler?


  3. How can Visual Modeler help during design?


  4. How can Visual Modeler help during implementation?


  5. How can Visual Modeler help during further development?


  6. How is the Logical View documented?


Installation Questions:
  1. I can't find the Class, Reverse Engineering, or Code Generation Wizard on the Tools menu. Where is it?


  2. What are the prerequisites to be able to run Visual Modeler efficiently?


Editing Diagrams and Classes:
  1. I can't find the Class, Reverse Engineering, or Code Generation Wizard on the Tools menu. Where is it?


  2. What are the prerequisites to be able to run Visual Modeler efficiently?


Editing Diagrams and Classes:
  1. I can't paste classes into my diagram. Why?


  2. When executing the Class Wizard, the message "The Class Wizard could not be found" is displayed. Why?


Generating Code:
  1. When executing the Code Generation Wizard, the message "The Code Generation Wizard could not be found" is displayed. Why?


  2. How do I control and preview what code to generate for a class?


  3. How is inheritance (Generalization Association) in Visual Modeler mapped to Visual Basic code?


  4. I have generated code with some GenerateGet, GenerateSet, or GenerateLet code generation options selected. Why are they deselected after the code generation?


  5. How do I change the implementation type of a class?


  6. I moved or copied a method from one class to another in the model and generated code. Why is the new method body in the Visual Basic project empty?


Reverse Engineering:
  1. When executing the Reverse Engineering Wizard, the message "The Reverse Engineering Wizard could not be found" is displayed. Why?


  2. The ActiveX component I need to reverse engineer does not show up on the Selection of Components page of the Reverse Engineering Wizard. Why?


Visual Basic 5.0 Integration:
  1. How do I reuse Visual Basic components in my model?


  2. I get the error message "VB5 not installed" even though it is installed. Why?


Configuration Management:
  1. Nothing happens when I execute the SourceSafe commands on the Tools menu. What is wrong?


  2. How do I version control a model?


General:
  1. How do I control the appearance of a diagram?


  2. How do I control the type of relationships to display in a diagram?


  3. How do I control whether to display properties and methods for the classes in a diagram?


  4. What is the difference between the Delete and Delete from Model commands?


  5. What is the difference between logical view, component view, and deployment view?


  6. Why did I loose my associations? I had a class "tree" associated with a class "fruit" in package A. I created another package B. I did Query:Add Classes in package B and added the classes from the old package. Then I "relocated" each of the classes. I then removed the old package because it was empty. In the new class package the association is missing.


  7. How do I recover lost classes? Classes appear in the model specification, even though I deleted them. Why?


  8. How can I clone a class?


  9. Can I suppress the data type of properties that appear in the class icon the same way I suppress the method signatures?


Questions and Answers

  1. Q. What is Microsoft Visual Modeler?

    A. Visual Modeler is a graphical object modeling tool that is tightly integrated with Microsoft Visual Basic 5.0. Visual Modeler allows you to fulfill the promise of object-oriented programming by quickly and easily creating applications that are maintainable, have a long lifetime, and are comprised of components that can be reused in other applications.

    These are the main features of Visual Modeler:

    • Class diagrams - the design of the system you are about to develop in terms of a model using a high level of abstraction. The diagram notation provided by Visual Modeler is a subset of the modeling constructs defined by the Unified Modeling Language (UML).


    • Code generation - the ability to generate Visual Basic code automatically from the design model you have created with Visual Modeler.


    • Reverse engineering - the ability to create or update the model automatically with changes made to the Visual Basic code.


    • Round-trip engineering - the combination of modeling, code generation, coding, and reverse engineering.




  2. Q. What is a model in Visual Modeler?

    A. A model of a system describes a view of the system on a higher level of abstraction than the source code. Compare a system model to the description of a society and the source code to bricks in a building When describing a society, you do not do it in terms of bricks, you probably do it in terms of buildings and groups of buildings with different purposes (schools, industries, shops, houses, and so on) and the communication paths in between (streets, roads, railways, and so on). Such models of complex systems are needed because it is impossible, and not interesting to everyone, to understand all the details of the system. By modeling, you can focus on one aspect at a time and also work on a higher level of abstraction. The more complex your system is, the more you need a model.

    In Visual Modeler, a system is modeled from three different views, each one with its own purpose:

    • Logical view - describes the logical structure of the system (the classes and their relationships).


    • Component view - describes the physical structure of the system (how the system is divided into .exe files and DLLs).


    • Deployment view - shows the system's nodes and the connections in between and the allocation of processes to nodes.




  3. Q. How can Visual Modeler help during design?

    A. There are several situations in the design phase when using a visual modeling tool such as Microsoft Visual Modeler has major advantages. The first situation is the early phase when you decide which classes you need and how they are related. When the first outline of the object model is stable, you need to specify each class. The requirements might still change, though. Using Visual Modeler to sketch different solutions and specifying the classes means that:

    • It is easier for other people to understand the system design from your diagram than from the code.


    • Your development team has a common diagram notation, which means that everyone understands the diagrams without further explanation.


    • You can concentrate on what the system is supposed to do, and not how things are going to be implemented.


    • It is a quick job to change the diagrams and specifications when the requirements change, compared to the time it takes to rewrite the corresponding code.


    • You can try various design approaches and communicate your ideas among the development team members.




  4. Q. How can Visual Modeler help during implementation?

    A. When the interface of the classes is stable (when the public properties, relationships, and methods are defined in Visual Modeler), it is time to implement the model. Using the round-trip engineering features in Visual Modeler during implementation means that:

    • You do not have to write the skeleton Visual Basic source code. You simply generate all class modules, properties, and method specifications. Then, the implementation phase needs to be refined to generate source code until you have an executable system.


    • You can keep code and model consistent with each other automatically by using the reverse-engineering feature.


    • If you have an undocumented system, you can use the reverse- engineering feature to create a model of that system, and continue the development work in the new model.


    • You can include ActiveX components in your model by using the reverse-engineering feature.




  5. Q. How can Visual Modeler help during further development?

    A. The model is used when you discuss the structure of the system with others or when you want new project members to understand the system quickly, as well as during further development of the system to get a quick overview of how things are related in the system. A successful system always needs further development. If you have used Visual Modeler to document your system you will notice that:

    • The model documents important design decisions.


    • New project members easily understand how the system is structured by looking at the diagrams and studying the high-level specifications of the classes.


    • It is easy to introduce changes into the system because Visual Modeler can tell you exactly which classes are affected by a change in one class.




  6. Q. How is the Logical View documented?

    A. Each package, class, method, property, and relationship in the model is completely described by a specification. The model is illustrated in several diagrams, each with its own purpose. Thus, a class in the model can appear in more than one diagram. In the logical view, documentation of the following types are used to describe the system:

    • Three-tiered diagrams - illustrate the overall structure of the system. These diagrams support the three-tiered architectural approach used when building Microsoft Visual Basic applications by separating the components of the system into three layers of services: User Services, Business Services, and Data Services. The three-tiered model especially supports the creation of large, complex client/server applications. By default, a three-tiered diagram called Three-Tiered Service Model is created at the top level of the Logical View when a new model is opened.


    • Class diagrams - illustrate a part or an aspect of the model of special interest. For each logical package in the model there is a special, automatically-created class diagram called Package Overview. A Package Overview diagram illustrates the contents of the package to which it belongs. It is automatically updated when a new class is assigned to or removed from the package. To create a new class diagram, select a package, choose Class Diagram from the Browse menu, and double-click on New. The same diagram notation is used in class diagrams, Package Overviews, and three-tiered diagrams.


    • Specifications - hold all details about the elements in the model. Each class, method, property, or relationship in the model is defined by a specification which is automatically created and updated. The specification is presented in a dialog box with tabs for different aspects. In the dialog box, you are able to define and view the details about a class, method, property, or relationship. The easiest way to open the specification of a class is to double-click on the class symbol in a diagram or on its name in a list.




Installation Questions

  1. Q. I can't find the Class, Reverse Engineering, or Code Generation Wizard on the Tools menu. Where is it?

    A. Open the ROSE.INI file in your Windows folder and make sure that the following sections contain paths to your Visual Modeler folder:
    [Virtual Path Map]
    SCRIPT_PATH=your_Visual Modeler_directory

    [Visual Modeler 1.0]
    MSVM_MENU_PATH="your_Visual Modeler_directory\Msvm.mnu"
    MSVM_PTY=your_VM_directory\Msvm.pty


  2. Q. What are the prerequisites to be able to run Visual Modeler efficiently?
    
       A. Operating system:    Windows 95, Windows 98, Windows NT
          Disk space:          30 MB(plus 20MB during installation)
          RAM:                 32 MB
    
          Related Software:
    
       Round-Trip Engineering:    Microsoft Visual Basic 5.0 Enterprise Edition
       Configuration Management:  Microsoft Visual SourceSafe 5.0
       Documentation Reports:     Word 7.0
       Web Access:                Internet Explorer
     


Editing Diagrams and Classes

  1. Q. I can't paste classes into my diagram. Why?

    A. You cannot use the Paste command to insert classes into three-tiered diagrams. The reason is that it is not clear into which of the tiers the class should be inserted. You cannot use the Paste command in a Package Overview diagram for a package either, because that diagram can, by definition, only contain classes that belong to the package. The Paste command would therefore relocate the pasted class from the package where it was copied to the package that owns the Package Overview. Because that might not be what you wanted to do, the command is not available in those diagrams.


  2. Q. When executing the Class Wizard, the message "The Class Wizard could not be found" is displayed. Why?

    A. In some configurations there may be problems registering DLLs used by Visual Modeler. To register the DLLs, run regmsvm.bat from the directory in which Visual Modeler is installed.


Generating Code

  1. Q. When executing the Code Generation Wizard, the message "The Code Generation Wizard could not be found" is displayed. Why?

    A. In some configurations there may be problems registering DLLs used by Visual Modeler. To register the DLLs, run regmsvm.bat from the directory in which Visual Modeler is installed. Then the Wizard should be able to execute.


  2. Q. How do I control and preview what code to generate for a class?

    A. The code generator uses the code generation options defined for each class, property, association role, and method to make the mapping of model components to Visual Basic code. In the Code Generation Wizard you are able to define this mapping. That is, the Wizard allows you to change the code generation option values for the selected classes and their properties, roles, and methods. It also gives you a preview of the code that will be generated with the current code generation option setting.

    To simplify, the Code Generation Wizard lets you define the most common and important code generation options. However, the code generation options for a class, property, association, or method are available on the Visual Basic tab in its specification dialog. You can view and change all of the code generation option values in this dialog. By default, a predefined set of code generation options is attached to each new model component. You can change that to another set on the Visual Basic tab.


  3. Q. How is inheritance (Generalization Association) in Visual Modeler mapped to Visual Basic code?

    A. Inheritance means that one class shares its properties, methods, and relationships with another class or conforms to the interface of another class. In Visual Basic, the closest correspondent to the generalization relationship is the implements construct. Thus, for a generalization relationship between a subclass B and a superclass A, Visual Modeler generates the following code into B'S class module:

    • An Implements A statement.


    • An object of the superclass.


    • Copies of A's public methods, including default dispatching implementations that delegate to the parent class A.


    Note that implements means only conformance to the public interface. Thus, B inherits only A[ASCII 146]s public methods, not the private methods. Also, if a class C implements B, C does not implicitly implement A, because the implementation of A[ASCII 146]s public methods in B becomes private in B. Note that inheritance between class utilities in Visual Modeler do not result in any Visual Basic code.


  4. Q. I have generated code with some GenerateGet, GenerateSet, or GenerateLet code generation options selected. Why are they deselected after the code generation?

    A. They are deselected because the Code Generation Wizard creates the Property Get procedure both in Visual Modeler and in Microsoft Visual Basic. When the procedure is created, the corresponding GenerateGet code generation option is reset.


  5. Q. How do I change the implementation type of a class?

    A. Once you have generated a class, you cannot alter its implementation type in Visual Modeler. Thus, the Edit:Change Into command cannot be used on classes or class utilities that you have generated code from. If you want to change a class module into a module, for example, you have to create a new class in the model, then copy the necessary information from the original class, set its implementation type to "Module," delete the original class, and generate code for the new class.


  6. Q. I moved or copied a method from one class to another in the model and generated code. Why is the new method body in the Visual Basic project empty?

    A. When you move or copy a method from one class to another, Visual Modeler regards the method as a new method in the other class. When generating code for a new method, the method body always becomes empty. Thus, if you have to move a method from one class to another, do it in Basic project and not in the model.


Reverse Engineering

  1. Q. When executing the Reverse Engineering Wizard, the message "The Reverse Engineering Wizard could not be found" is displayed. Why?

    A. In some configurations, there may be problems registering DLLs used by Visual Modeler. To register the DLLs, run regmsvm.bat from the directory in which Visual Modeler is installed.


  2. Q. The ActiveX component I need to reverse engineer does not show up on the Selection of Components page of the Reverse Engineering Wizard. Why?

    A. To add it to your Visual Basic project, click References from the Project menu in Visual Basic and select the missing ActiveX component.


Visual Basic 5.0 Integration

  1. Q. How do I reuse Visual Basic components in my model?

    A. By reverse engineering Visual Basic ActiveX components into your model, you can access and reuse their interface classes from other classes in your model. Simply click Reverse Engineering Wizard on the Tools menu in Visual Modeler and select the ActiveX components you want to insert into your model.


  2. Q. I get the error message "VB5 not installed" even though it is installed. Why?

    A. If you have never run the Microsoft Visual Basic 5.0 program after installing it, Visual Modeler might not be able to localize the installation. In that case, run Microsoft Visual Basic 5.0 once.


Configuration Management

  1. Q. Nothing happens when I execute the SourceSafe commands on the Tools menu. What is wrong?

    A. For Visual Modeler to be able to access Microsoft Visual SourceSafe, your installation of Visual SourceSafe has to contain the SourceSafe Integration component. Make sure that this component is installed by running the Visual SourceSafe setup program. Click Add/Remove and select the Enable SourceSafe Integration option on the Maintenance Mode page. (Note that this option was not selected if your installation was done via the "Server" alternative.)


  2. Q. How do I version control a model?

    A. Visual Modeler includes an integration with Visual SourceSafe by providing the most frequently used SourceSafe commands on the Tools menu in Visual Modeler. Thus, you are able version control a model by using the usual Check In and Check Out commands. If you want to use another configuration management tool, you can integrate with that tool by updating the SourceSafe submenu.

    More information is found in the Visual SourceSafe Integration section of the "Round-Trip Engineering in Visual Modeler" Online Book.


General

  1. Q. How do I control the appearance of a diagram?

    A. The commands on the Diagram Object Properties menu (located under the Edit menu) can be used to customize various Visual Modeler features. The characteristics you set with this menu affect only the selected icon(s). Setting the same characteristics through the Options dialog box (located under the Tools menu) affect future items created on the diagram. To organize the classes on the diagram automatically, click the Layout Diagram command on the Tools menu.

    You will also find some useful options on the Diagram tab in the Options dialog box under the Display and Grid sections.


  2. Q. How do I control the type of relationships to display in a diagram?

    A. There are several ways to control the types of relationships to display in a diagram. To control which kind of relationships to show for the current classes in a diagram, use the Filter Relationships command on the Query menu.

    To show generalization relationships between classes in the diagram and classes that are not part of the diagram, select the classes in the diagram and click Expand Selected Classes on the Query menu. To control which relationships to show for the classes in the diagram, as well as for all classes that you create or paste in the diagram from now on, use the Options command on the Tools menu. Then select the proper options on the Diagram tab of the dialog box shown.


  3. Q. How do I control whether to display properties and methods for the classes in a diagram?

    A. To control whether to show properties and/or methods for selected classes in the diagram, point at the Diagram Object Properties command on the Edit menu, and click the appropriate command. To control whether to show properties and/or methods for the classes in the diagram, as well as for all classes that you create or paste in the diagram from now on, use the Options command on the Tools menu. Then select the appropriate options on the Diagram tab of the dialog box shown.


  4. Q. What is the difference between the Delete and Delete from Model commands?

    A. The Delete command only deletes the model component from the current diagram. However, the model component is still available in the model from the browser and you can insert it in other diagrams. The Delete from Model command, on the other hand, deletes the model component from both the current diagram and the model itself. The model component is not accessible any more after that.


  5. Q. What is the difference between logical view, component view, and deployment view?

    A. The logical view describes the logical structure of the system (the classes and their relationships). The component view describes the physical structure of the system (how the system is divided into .exe files and DLLs). The deployment view also shows the physical structure, but focuses on connections between the system[ASCII 146]s nodes and the allocation of processes to nodes.


  6. Q. Why did I loose my associations? I had a class "tree" associated with a class "fruit" in package A. I created another package B. I did Query:Add Classes in package B and added the classes from the old package. Then I "relocated" each of the classes. I then removed the old package because it was empty. In the new class package the association is missing.

    A. Visual Modeler has "model elements" that include classes and associations. The model elements are "owned" by the class packages in which they are created. Model elements can be "relocated." You relocated the classes but did not relocate the associations, so when you deleted the class package you also deleted the association. You should have selected the associations and relocated them also.


  7. Q. How do I recover lost classes? Classes appear in the model specification, even though I deleted them. Why?

    A. There are two kinds of delete in Visual Modeler. There is the Edit:Delete that is the shallow delete and simply deletes the displayed item from the diagram; the item still remains in the underlying model. The Edit:Delete From Model deletes the item from the model. When you print out the specification for the entire model, all the shallow deleted classes will still show up in the specification.


  8. Q. How can I clone a class?

    A. Occasionally you may need two classes with the same properties and methods but just a different name. You can do an Edit:Copy of a class, but because Visual Modeler has name-associations, the classes should have unique names. Hence, after you copy a class, any changes you make to one class will reflect on the other. The work around for this situation is as follows:

    • Select the class you wish to clone.


    • Do an Edit:Copy on this class. A copy of this class is now being maintained on the clipboard.


    • Change the name of the class currently displayed on the diagram to whatever you wish, other than the one you already copied.


    • Do Edit:Paste. You now have two classes, both with the same underlying state and behavior but two different names.




  9. Q. Can I suppress the data type of properties that appear in the class icon the same way I suppress the method signatures?

    A. No.



REFERENCES

http://www.rational.com

Visual Modeler Help files

Additional query words: Visual Modeler kbVBp500 kbVBp kbWinOS98 kbDSupport kbdse

Keywords : kbGrpVBDB
Version : 5.0
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: January 5, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.