Cadcorp SIS API Methods

CreateClassTreeFilter Method

Description

Creates a named Class Filter in Named Object Libraries, replacing any existing Filter with the same name.

Syntax

Visual Basic
Public Function CreateClassTreeFilter( _
   ByVal filter As String, _
   ByVal formula As String _
) As Integer

Parameters

filter
The named Filter to create or replace.
 
formula
A class tree formula of the form "-Class +SubClass1 -SubClass2 +SubClass3", e.g. "-Item +Line +Area" will match only LineString and Polygon Items, and their sub-classes.

Remarks

The item class names in the formula$ argument, which reflect the Cadcorp SIS C++ class names, are not necessarily the same as those that appear in the SIS user interface, which are translatable. In particular the "Polygon" and "TopoLineString" item classes should be specified as "SeedArea" and "SeedChain" respectively. The class name to use in this method is stored in the Class name item property. The translatable class name is stored in the Item class property.

Available: GEO MD MM ME OD OM SISpy

Group:

Example

This example creates a filter for all items excluding polygons:

sis.CreateClassTreeFilter ("NotPolygons", "+Item -SeedArea")

Note: Add a colon to the end of the class whose children you want to ignore, for example:

sis.CreateClassTreeFilter ("NotPolygons", "+Item -SeedArea:")


Send comments on this topic.

Click to return to www.cadcorp.com

© Copyright 2000-2017 Computer Aided Development Corporation Limited (Cadcorp).