What is a CD file?
A file with .cd extension is a Visual Studio class diagram file that provides information about the structure and relationship between all the classes in the current solution. A Visual Studio solution (represented by .sln) may contain one or more projects, each having multiple different classes. The class diagram file can be generated by right-clicking the project and selecting the class diagram option.
Class Diagram (.cd) File Format - More Information
A class diagram file is saved in standard XML file format that represents classes in a project as XML nodes. If Visual Studio is not available, these class diagram files can be opened in any application program that supports opening XML files.
How to Add Class Diagrams to Visual Studio Project
In Visual Studio, open the Solution/Project for which you want to add the class diagram. Then, right-click the project node and then choose Add > New Item. Or, press Ctrl+Shift+A.
The Add New Item dialog opens.
Expand Common Items > General, and then select Class Diagram from the template list. For Visual C++ projects, look in the Utility category to find the Class Diagram template.
Export Class Diagrams (CD) to Images
Visual Studio allows to convert/export class diagrams to images such as PNG, JPEG, and BMP. These exported class diagram files can be used for documentation and technical data pack (TDP) record keeping purpose. To convert a class diagram to image, the following steps can be used from within the Microsoft Visual Studio.
- Open your class diagram (.cd) file.
- From the Class Diagram menu or the diagram surface shortcut menu, choose Export Diagram as Image.
- Select a diagram.
- Select the format that you want.
- Choose Export to finish exporting.