SetLayers

Usage                  Boolean SetLayers(Layers As Integer, NumOfLayers As Integer)

Description         Sets the viewable and editable layers. The layer numbering is 0-based and the default layer is 0 (zero).

Parameters         Layers                    Integer             The first item of an array, which contains the Integer layer numbers to set

                             NumOfLayers       Integer             The number of data items (layers) in the array

Return value      False, if there is not enough memory, otherwise True.

Programming Notes        You can choose one or more layer to view and edit at the same time. Objects on  the viewable layers can be modified. New objects are placed on the active layer, which can be specified by the SelectLayer method. The active layer must be one of the viewable layers, so you cannot change the active layer, if the number you pass to the SelectLayer method is not in the layer list entered by the SetLayers method. On the other hand, the SetLayers method can specify different layers than the active layer, in this case the first layer in the array will be the active.

                                          If Layers or NumOfLayers is Null(0), all the layers will be visible (this is the default). The Annotation OCX allocates memory inside for the layer number array, so you don't need to keep your array after the method returns.

                                          If you don’t want to use parameters as references in the parameter list you can use the following methods for handling viewable layers: SetLayerNumberAt, GetLayerNumberAt, SetNumberOfLayers, SetLayersExt. If you use C#, JavaScript, etc you should use these methods for layers.