This sample uses the ConceptDraw Basic scripting language to create basic ConceptDraw shapes. The external module HalloWorld.cdb contains two procedures - HalloWorld1 and HalloWorld2.
HalloWorld1 clears the active document from all shapes in it and creates a new shape - a rectangle. The rectangle contains the following text: "Hello World!".
The HalloWorld2 make the same, but has different code. It doesn't declare auxiliary variables. The reference to a new object (for instance, the active document), which returns other object's method or property (for instance, the ActiveDoc property of the Application object) is not assigned to an intermediate variable. It's used immediately to address properties and methods of the resulting object.
The HalloWorld1() and HalloWorld2() procedures are located in the external module DrawDiagram.cdb and are called from a document-level script. If the "Enable ConceptDraw Basic script autorun" flag is not set in the Preferences dialog of ConceptDraw, the scripts can be run from the ConceptDraw Basic editor (Tools->ConceptDraw Basic->Document Script->Edit) from the Build->Run menu.