This example is a custom display that handles XSI notifications and Win32 messages. The example shows how to define the interface and callbacks to XSI, and how to access the notifications that XSI pushes to the custom display host.
Note: This example uses the Windows API and is not available on Linux.
| Location | |
| Files |
CustomUITest.cpp
CustomUITest.h
CustomUI.cpp
CustomUI.h
CustomUITest.vcproj |
To run the example
- Or -
Run this code in the script editor:
var oActiveLayout = Application.Desktop.ActiveLayout; var oCDH = oActiveLayout.CreateView( "Custom Display Host", "MyCustomDisplayHost" ); oCDH.SetAttributeValue( "targetcontent", "NotificationTest" ); oCDH.Resize( 500, 500 );
XSI SDK includes a compiled version of the plug-in. If you want to modify the code, you can rebuild the example by following these instructions.
To build the example on Windows
Open an XSI command prompt, and type devenv to start Visual Studio .NET.
Starting Visual Studio .NET from an XSI command prompt ensures that environment variables such as XSISDK_ROOT are set (otherwise you'll get build and link errors).
Tip To load the CustomUITest project from the command line, type:
devenv CustomUITest.vcproj
To build the example on Linux
This example uses the Windows API and is not available on Linux.
This example uses the following keywords:
C++ example, IsA, ViewContext, IsValid, PutUserData, GetUserData, Init, Term, Notify, RegisterCustomDisplay, siEventID, GetNotificationData, siOnSelectionChange, siOnTimeChange, siOnValueChange, CSelectionChangeNotification, GetSelectionList, CTimeChangeNotification, CValueChangeNotification, GetOwner, GetClassIDName, GetClassID, siPrimitiveID, siParameterID, siClusterID, Geometry, Parameter, CClusterElementArray, GetComponentName