I agree, and thought about doing that,  

if this is the case then this is a limitation in MapX that needs fixing.
You should be bale to manipulate features in a feature collection using add,
remove etc without tying them to an actual map layer.  The attach method
should do the necessary, in terms of coordsys etc.  

I have had other problems in version 4 that I can solve in vb, such as the
remove all methods not being there.

Collections and COM objects should have standard methods such as Add,Remove,
Remove All etc built into them without having to build extra on top.

Be interested to here others thoughts.

Regards

Dave Troughear
Technical Consultant

~~~~~~~~~~~~~~~~~~~~
Informed Solutions Ltd
The Old Bank
Old Market Place
Altrincham
Cheshire
WA14 4PA
+44 161 942 2000 (phone)
+44 161 942 2025 (fax)
http:\\www.informed.co.uk
"The opinions expressed here are mine and mine alone.  They  may not
represent those of Informed Solutions, its associates or clients."




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 15, 2000 1:12 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: MI A simple operation - not so simple!


I have had the same experience. I suspect the features.add can only be used
to add to the map. Maybe you need to use a simple VB collection rather than
a layer collection if you simply want to hold a collection of features
without putting them on the map.

-----Original Message-----
From: Troughear, David [mailto:[EMAIL PROTECTED]]
Sent: 15 February 2000 10:59
To: 'mapinfo-l@lists. csn. net' (E-mail)
Subject: MI A simple operation - not so simple!


Why? Oh Why? - Adding a Feature

I continually come up against this problem...

I am trying to create a line feature and add it to the feature collection
"ftrs"

It's not a real map layer - it's a copy of it - so why do I continually get
the message - "Operation not allowed on standalone feature object?????

Dim nftr as new feature
Dim ftrs As New Features

Set ftrs = MapXMap.Layers.Item(ROADS_LAYER).NoFeatures          'ROADS_LAYER
contains line objects

nftr.Attach MapXMap                                     ' This makes it no
longer standalone
nftr.Type = miFeatureTypeLine
nftr.Parts.Add newPnts                           'This is a collection of
points making a line

ftrs.Add nftr                           'This should add to the collection
but doesnt

I dont want to add the features to a map layer. I want to build a collection
of features.
Anyne come across this - or can suggest what I'm doing wrong?

Regards

Dave Troughear
Technical Consultant

~~~~~~~~~~~~~~~~~~~~
Informed Solutions Ltd
The Old Bank
Old Market Place
Altrincham
Cheshire
WA14 4PA
+44 161 942 2000 (phone)
+44 161 942 2025 (fax)
http:\\www.informed.co.uk
"The opinions expressed here are mine and mine alone.  They  may not
represent those of Informed Solutions, its associates or clients."



----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to