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]

Reply via email to