Note: you will need to include PointSetData and PointSet2D in your Module Dependencies list in addition to Viewer2D.
Pointset layers can only be added to a XSection window if that window already contains a seismic layer. In this example, we assume you have already created a pointset dataset pointsetData and a XSection window xsectionWindow.
NamedProps layerProperties = new NamedProps();
layerProperties.putProperty(IPointSetLayer.POINT_SIZE, 8);
IPointSetLayer layer = IPointSetLayer.factory.createLayer(xsectionWindow, pointsetData, layerProperties, false);
Pointset layers can only be added to a Map window if that window already contains a seismic layer. In this example, we assume you have already created a pointset dataset pointsetData and a Map window mapWindow.
NamedProps layerProperties = new NamedProps();
layerProperties.putProperty(IMapPointSetLayer.POINT_SIZE, 8);
IMapPointSetLayer layer = IMapPointSetLayer.factory.createLayer(mapWindow, pointsetData, layerProperties, false);