Tricks for plug-in development.

Control background color of shape using Open API

tomcat-thumbWhen creating diagram sometimes you might want to have shapes showing different background color. To do this you can specify the background color of individual elements one by one. But instead of manually specify the background color shape by shape, you can also do this via Open API. In this article we will demonstrate how to control the background color setting of elements in your active diagram using Visual Paradigm Open API. Read more

Replace Model Element with Open API

In Visual Paradigm the models you created are in repository basis, where a single model element can appear on multiple diagrams, or even multiple occurrence in a single diagram. Each occurrence (we call the view) on diagram is a visual presentation of the model element. In some case you might want to change the underlying model element of a view to another model element without affecting the diagram. In this article we will show you how to change the underlying model element of a view using Open API. Read more

Understanding date time format of comment

When inserting comment to diagram/model element via Open API the date & time look different to those created from GUI.

Comment generated by Open API showing different date time format

Read more

Changing Order of Child Elements using Open API

tomcat-thumbThe Model Explorer is the place which showing entire model collection in your project as well as their structures. Visual Paradigm provide different ways for present the elements in Model Explore by using different sorting algorithms. But even the best sorting algorithms sometimes may not fit you need. In this case you may need to manually order the elements in the order you like. With Open API you can do this programmatically by creating a plugin. In this article we will show you how to change the order of child elements in the selected parent model element. Read more

How to Create Connectors with Turning Points using Open API

Visual Paradigm’s Open API allows you to create all kind of our supported connectors in diagram. They are not necessary to be in simple straight line form. You can create complex connectors with multiple turning points just like those you created in diagram with your mouse. This article will teach you how to create connectors with turning points using Open API. Read more

Create and Access Logical View via API

Open API not only allows you access the model data within the project, but also create and access the Logical View in your project. This article will show you how to create Logical View using Open API. Read more

How to Create Containment Relationship with API

Open API not only allows you access the model data within the project, but also creating new model elements and connector. This is not only for standard connectors such as association, but also relationships such as containment. This article will show you how to create containment relationship using Open API. Read more

Reload Plugin without Restarting Application

Open API allows you to extend the functionalities of Visual Paradigm’s products by writing simple Java classes. But during development you often need to reload your plugin by restart the application. Starting from version 10 (build 20120720ab) you can reload the plugin on the fly, without restarting the application. This article will teach you how to do this. Read more

How to Remove User Defined Tagged Values for All Model Elements Using API

Using tagged values is a convenient way to define additional details to model element. You can define tagged values on individual elements as a one-off usage, or define it under Stereotypes and reuse it by apply the stereotype to model elements. But to remove the tag, say you found that one of the tagged values in your model is no longer valid, you will have to go through model by model to locate and remove them. It is OK for a small project, but a very time consuming job for a large project. Since the Open API provides full access to the model data within the project, we can make use of it to remove the unwanted tagged values. In this article will show you how to remove the user defined tagged values from model element by developing a plugin. Read more

Export active diagram as image via Open API

Visual Paradigm’s Open API is a powerful tool which allow user to extend the functionalities of Visual Paradigm software. With Open API you not just allow to access the model information, but also allow to export diagram into images. Read more