Working with CAD metadata

The GroupDocs Metadata API provides the feature to read basic metadata in CAD files. The supported CAD formats are:

  • DWG
  • DXF

Reading CAD metadata

To access metadata in a CAD drawing, the GroupDocs.Metadata API provides the CadRootPackage.getCadPackage method.

The following code snippet reads metadata associated with a CAD file.

advanced_usage.managing_metadata_for_specific_formats.cad.CadReadNativeMetadataProperties

try (Metadata metadata = new Metadata(Constants.InputDxf)) {
	CadRootPackage root = metadata.getRootPackageGeneric();

	System.out.println(root.getCadPackage().getAcadVersion());
	System.out.println(root.getCadPackage().getAuthor());
	System.out.println(root.getCadPackage().getComments());
	System.out.println(root.getCadPackage().getCreatedDateTime());
	System.out.println(root.getCadPackage().getHyperlinkBase());
	System.out.println(root.getCadPackage().getKeywords());
	System.out.println(root.getCadPackage().getLastSavedBy());
	System.out.println(root.getCadPackage().getTitle());

	// ...
}

More resources

GitHub examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free online document metadata management App

Along with full featured Java library we provide simple, but powerful free Apps.

You are welcome to view and edit metadata of PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX, emails, images and more with our free online Free Online Document Metadata Viewing and Editing App.