How to: Class Diagram with "references" to classes of another, but referenced DLL

Locked How to: Class Diagram with "references" to classes of another, but referenced DLL

  • 2011년 12월 20일 화요일 오전 8:50
     
     

    Hi,

    I have a solution with several projects, which are already referencing each other.

    In the "Class View" I see in the UI project the used classes with an horizontal, right pointing arrow in the icon.

    I'm not able to show class members using those core classes as associations. Always an error is raised.

    Dragging one of those external/core classes into the class diagram, VS tells about limitations of this tool.

    Any suggestion or direction how to succeed?

    Best regards,

    Martin

모든 응답

  • 2011년 12월 22일 목요일 오전 6:28
    중재자
     
     

    Hi Martin,

    Welcome to the MSDN forum.

    I use VS2010 Ultimate version, and The Class Diagram works well for me. Here is a screen shot for my sample:

    Here are some suggestions:

    1. Please check whether your files are added in the reference (check files in the reference folder). If missing the name, in the Solution Explorer window, right click the project name => add reference… => below the Project option.

    2. Try to rebuild the file before drag it into the Class Diagram windows.

    By the way, I’m not sure what do you mean by “I'm not able to show class members using those core classes as associations.”

    If they are not work for you or I misunderstood, please feel free to let me know. At the same time, please provide more information such as the error information.


    Mark Liu-lxf [MSFT]
    MSDN Community Support | Feedback to us

  • 2011년 12월 22일 목요일 오전 9:25
     
     

    Hi Mark,

    thanks for your reply!

    First I see a difference between your and my class view. My class view has no references folder, even if in the project properties references are defined!

       

    Aren't those classes with the "right" arrow in the icon referenced classes?

    > By the way, I’m not sure what do you mean by “I'm not able to show class members using those core classes as associations.”

    I meant, that I have a member attribute in a class in a UI DLL project, that is from our core DLL project. I made a right-click onto the member and selected "show as association" (or similar) and then an error was raised, that it is impossible, because it is "external" or not correctly referenced.

       

    The core DLL project has already referenced the UI DLL project, but is not able to visualize UI DLL project related class member attributes as associations, too.

    And adding the core DLL project as reference to the UI DLL project is denied, because of a than defined circular reference.

    So - how to show a member of a type of outside the current project, but defined by references as association?
    Or, how must the reference be defined in detail, that the "external" type is found correctly to show a member as association in the class diagram?

    Best regards,

    Martin

    • 편집됨 Martin Lemburg 2011년 12월 22일 목요일 오전 9:29
    •  
  • 2011년 12월 22일 목요일 오전 9:31
     
     

    Here again the error message, raised while trying to show a member as association in the class diagram:

    And here the class view of the project, where I tried to show a CMethodeBaseView member as association:

    Isn't CMethodBaseView already "available" for class diagrams?

  • 2011년 12월 23일 금요일 오전 9:01
    중재자
     
     

    Hi Martin,

    As far as I know, C++ project doesn’t contain the reference folder except the test project.

    Judging from the error information, the Class Diagram will show the instance of CMethodeBaseView class. Or if the CMethodeBaseView class file is contained in the project, Class Diagram will show it. You can try to fix the issue by copying the class file to the project.

    If it doesn’t work, I’m afraid that it is hard for me to reappearance your issue.  So would you like to share the issue project to the sky-drive?

    It is not necessary that you send out the whole of your project. We just need a simplest sample to reproduce the problem. You can remove any confidential information or business details from it.

    Sorry for any inconvenience and have a nice day.


    Mark Liu-lxf [MSFT]
    MSDN Community Support | Feedback to us

  • 2011년 12월 27일 화요일 오전 5:28
    중재자
     
     

    Hi Martin,

    We haven’t heard from you for a while. Have you solved your issue with the help of members? If you fixed your issue finally, would you like to share your solutions and experience here, it will be very beneficial for other community members who have similar questions. At the same time, please mark the helpful replies as answer.

    Sorry for any inconvenience and have a nice day.


    Mark Liu-lxf [MSFT]
    MSDN Community Support | Feedback to us