User-defined methods implemented in the Segment class and with a public visibility are exposed via the Segment’s COM interface. These are available in an interface called I_<segment name>, for example I_SAMPLE.
Segment methods can be called directly and executed as stand-alone methods outside the ispec cycle. You do not need to have a current session active, so state information is not retained between calls to methods.
Parameters can be passed and values returned.
Refer to the Unmanaged C++ Example and the Managed .NET C# Example for more information.