Pointwise CAE Plugin SDK
Create a CAE Plugin Project

main page | next>

The following text is taken from the src/plugins/README.txt file.

 * Pointwise Plugin utility functions
 * Proprietary software product of Pointwise, Inc.
 * Copyright (c) 1995-2017 Pointwise, Inc.
 * All rights reserved.

*** Introduction ***

This document covers the process of creating a "starting" plugin project. 
You can use this project to implement your plugins export logic.

It is suggested you verify your Pointwise CAE plugin SDK installation before 
making any of the changes detailed below.

Verify on windows (Visual Studio 2008):
Open the VisualStudio solution file .../PluginSDK/PluginSDK.sln (created in VS2008).
Select the "Build/Batch Build..." menu.
Press the "Select All" button.
Press the "Rebuild" button.

The CaeUnsXML and CaeStrXML sample plugins should build for all platforms 
(win32, win64) and build types (debug, release). The resulting DLL plugins are 
located under the .../PluginSDK/dist/<platform> folders.

NOTE: These instructions assume your installation is VisualStudio2008 and that 
it supports building both win32 and the x64 platform types. Using other 
versions of Visual Studio is untested and unsupported.

Verify on unix and macOSX:
Open a command shell.

   % cd .../PluginSDK
   % make machine=MID plugins-dr

   ... is your SDK's installation path
   MID is one of linux, linux_x86_64, or macosx. Use linux on a 32-bit build 
       machine. Use linux_x86_64 on a 64-bit build machine. Use macosx for all 
       intel based macOS build machines.

Alternately, if you set the "machine" environment variable, you can omit the 
machine=MID option.

   % cd .../PluginSDK
   % setenv machine linux_x86_64
   % make plugins-dr

The CaeUnsXML and CaeStrXML sample plugins should build for the platform
(linux, linux_x86_64, macosx) and all build types (debug, release). The 
resulting plugins (.so or .dynlib) are located under the 
.../PluginSDK/dist/<platform> folders.

*** tclsh Information ***

The included mkplugin and mkplugin.bat scripts are used to create new CAE plugin 
projects. These scripts require access to a tcl shell (tclsh). The scripts 
manage the proper integration of the new plugin project into the SDK framework.

For example;

    * Each plugin is assigned a unique id.
    * pluginRegistry.h is updated.
    * A make target is added.
    * Some plugin runtime data is initialized.

A tcl shell is included with your Pointwise installation. The pointwise tcl 
shell is invoked on unix using the script:

    /your/pointwise/installation/pointwise -b

and on winOS using:


If Pointwise is not installed on your development machine, you will need to
download and install a tcl shell on your machine. There are free installations
available on the web. Try http://www.activestate.com/activetcl/ for a good tcl

The scripts assume that the tcl shell (tclsh) is can be launched by name only.
That is, typing "tclsh" on the command line will start the tcl shell without
errors. If not already working, you may want to add the tclsh folder to the
shell's path or create an alias (unix) or a tclsh.bat file (winOS).

If you do not want to make shell changes as outlined above, you can invoke the
underlying tcl file using the following command line:

for unix and macOSX:

    /path/to/your/tclsh mkplugin.tcl <command-line-arguments>

for windows:

    \path\to\your\tclsh mkplugin.tcl <command-line-arguments>

The <command-line-arguments> are detailed in the script section.

*** A Few Comments Before We Begin ***

A Pointwise CAE Plugin must be declared as exporting "Structured" or 
"Unstructured" grids. The CAE solver being targeted determines the type. If a 
solver supports both structured and unstructured grids, 2 separate plugins 
must be created.

On every platform, the SDK builds all plugins using the platform's C++ compiler.
However, you can choose between one of two API entry point styles. Currently, C
and C++ entry point styles are supported. Which style you choose depends on your
development skill set. If you are most familiar with the C programming language,
use the -c switch to create a plugin using C-style entry points. If you are 
most familiar with the C++ programming language, use the -cpp switch to create 
a plugin using C++-style entry points. No matter which style you choose, you are
always free to use C++ for your plugin's internal code. See sections below for
more details.

The set of PluginSDK API calls available to a given plugin will be determined 
by the plugin type and language. If you get an "undefined" function compile 
error, you may be using an API call unsupported for your plugin's type or 

In the section below, we will be creating the unstructured, C-language plugin 
named "CaeUnsMyExporter". When complete, the cross-platform build will produce 
binaries similar to the following examples:

for BUILD=Release

for BUILD=Debug

*** Create a New CAE Plugin Project with the mkplugin Script ***

Use the following steps to create an unstructured, C-language CAE Plugin 
project (if you prefer the C++ language, you may use the -cpp switch in place 
of the -c switch).

Open a shell on your development platform.

Change to the "/path/to/your/PluginSDK" folder.

On the command line, enter the following...

for unix and macOSX:
    ./mkplugin -uns -c MyExporter

for windows:
    mkplugin -uns -c MyExporter

If all goes well, you should see a message similar to one of the following:

    "creating new unstructured c plugin 'CaeUnsMyExporter' with ID=20..."

There are other switches supported by mkplugin. To see the full, command line 
usage, use the -h switch as:
    ./mkplugin -h    (unix and macOSX)
    mkplugin -h      (windows)

*** C-Style Entry Points ***

Using the -c switch, mkplugin produces a plugin with several empty C functions 
that you must modify with your plugin's logic. These C-functions are:

  * PWP_BOOL runtimeCreate(...)
  * PWP_BOOL runtimeWrite(...)
  * PWP_VOID runtimeDestroy(...)

These functions are located in the runtimeWrite.cxx module. See the CAE Plugin 
SDK documentation for details.

*** C++-Style Entry Points ***

Using the -cpp switch, mkplugin produces a plugin class with empty methods
that you must modify with your plugin's logic. These class methods are:

  * static bool CaeUnsMyExporter::create(...)
  * virtual bool CaeUnsMyExporter::beginExport()
  * virtual PWP_BOOL CaeUnsMyExporter::write()
  * virtual bool CaeUnsMyExporter::endExport()
  * static void CaeUnsMyExporter::destroy(...)

The CaeUnsMyExporter class and methods are located in the CaeUnsMyExporter.h
and CaeUnsMyExporter.cxx modules. See the CAE Plugin SDK documentation for


The End (for now)

main page | next>