Blog about software development, automating SOLIDWORKS with macros and API, C# Visual Basic, WPF, WCF, web development, tips & tricks

How to watermark SOLIDWORKS documents and protect your IP

17 Mar, 2020

Watermarking SOLIDWORKS document
Watermarking SOLIDWORKS document

Have you asked yourself a question while designing your products in SOLIDWORKS: how would I protect my intellectual property?

There might be multiple reasons you want to do this:

  • Your company wants to ensure that IP remains the company's IP
  • You are helping fellow SOLIDWORKS users on the forum and want your example to be used for reference only
  • You are working for an educational institution and want to avoid sharing of models between students

In this blog article I will share different ways of watermarking your SOLIDWORKS document.

We can identify 2 main groups of watermarking by visibility:

  • Hidden watermark. Something you want to stay in your model and could be only revealed on demand
  • Visible watermark. Something you want to be immediately visible to all users who open the model. For example SOLIDWORKS adds the square academic cap as an icon for all files created with educational version of SOLIDWORKS. Video editing softwares add the watermark to published files indicating that the video made with Trial version.

We can also identify 2 groups by the protection level:

Weak Protection

Custom Property

The first idea would be to add custom property Owner and specify the details, but the property can be very simply altered or modified from the user interface.

Created By Feature Attribute

The most common way of recognizing your model is to look up at the Created By attribute of the feature Properties dialog. This is read-only attribute which cannot be changed unless feature is recreated. But in this case you will need to have unique enough Windows user name for that option to be sufficient. Furthermore it is not possible to embed more additional information into the model and lastly it is not immediately noticeable for the users.

Created By attribute in the feature property
Created By attribute in the feature property

Another disadvantage as it only protects features. While your model can have more intellectual property in it, such as sketch elements, blocks, annotations and this approach will not protect this data as all features can be removed and recreated with new owner. It is possible to be a bit more inventive and create a dummy feature and completely hide it from the Feature Manager Tree thus it will still remain in the model. But the hidden feature can be also revealed using SOLIDWORKS API.

Attribute Features

SOLIDWORKS API provides a way to add custom metadata into the document using the attribute features. Those are special features only editable, readable and creatable by SOLIDWORKS API.

Attribute features in the feature tree
Attribute features in the feature tree

Custom data can be placed into those attributes and they can also be inserted invisible.

Strong Protection

3rd Party Storage

3rd Party Storage is a special placeholder in the SOLIDWORKS document where 3rd party developers can write custom content. This could be either simple text or more complicated structures or files.

One of the advantages is this functionality is also available via Document Manager API which means that it is possible to read and write this data without SOLIDWORKS application.

Although any developer can read and write the data to the storage, there is no API to iterate available 3rd party storages (after SOLIDWORKS 2015) which means you can create a unique enough name for your storage so other developers will not know the name and thus will not be able to access it for reading or writing. You can use Global Unique Identifier (GUID) to generate unique name.

The following program demonstrates how to add and read custom data in the document from command line.

In order to modify the storage name change the value of STORAGE_NAME constant as shown below.

class Program
    private const string DM_LIC_KEY = "<Your DM License Key>";
    private const string STORAGE_NAME = "f409fd7d-9837-4559-95a6-f8019a6ed140"; //unique name
    static void Main(string[] args)

Macro Feature

To make a visual watermark you can add non editable annotation with macro feature. This feature and note cannot be deleted or edited and embedded directly into the model.

Secure read-only note and feature
Secure read-only note and feature

With this approach it is always evident who is an owner of the document and it is ideal when created model is only used for demonstration purpose.

Subscribe to Newsletter

Powered by Docify