Hi Alejandro
          Please look in detail MapX help for working with Features
collection. Look for Features.Add method.

It says that the features added to such a collection should be from the
same layer. In case you got standalone features, attach them to the layer
on which you want them and then add them to the Features collection.

Also you should initialize the collection prior to use it. Something like
the provided example in the help

' Select every state which contains a Top 20 city.
Dim ftr As Feature
Dim ftrs As Features
Dim usaLayer As Layer
Set usaLayer = Map1.Layers.Item("USA")

Set ftrs = usaLayer.NoFeatures
For Each ftr In Map1.Layers.Item("US Top 20 Cities").AllFeatures
     ftrs.Add usaLayer.SearchAtPoint(ftr.Point)
Next
usaLayer.Selection.Replace ftrspn


HTH

Kaul, Deepak
Software Engineer
RMSI, NOIDA
INDIA


                                                                                       
                                      
                    "MAGS-Gerencia"                                                    
                                      
                    <[EMAIL PROTECTED]>              To:     "MapX \(Foro de 
Discusion\)" <[EMAIL PROTECTED]>, "MapInfo-L" 
                    Sent by:                             
<[EMAIL PROTECTED]>                                 
                    [EMAIL PROTECTED]       cc:                            
                                      
                    onsmag.com                          Subject:     MI-L Mapx Doubt   
                                      
                                                                                       
                                      
                                                                                       
                                      
                    02/08/02 09:34 PM                                                  
                                      
                    Please respond to                                                  
                                      
                    "MAGS-Gerencia"                                                    
                                      
                                                                                       
                                      
                                                                                       
                                      






Hi,

I recently start to program with Mapx, so may be the question is very =
easy. Sorry please.

I want to make a collection of features to combine them

I did:

Dim lfeatures as New MapXLib.Features
Dim lfeature_1 as New MapXLib.Feature
Dim lfeature_2 as New MapXLib.Feature

.. I create both features
Now, how add them to a new collection ?

I tried the next:
Set lfeatures =3D Nothing
lfeatures.Add lfeature_1
lfeatures.Add lfeature_2

but this gives me an error.

Which is the correct way ?

Regards
Alejandro





_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.






_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to