VBA - SubFeature Collection - XYZ (3D)

Hi folks

I've designed a Feature Collection in BM SS2 (434) called GEO_BOREHOLES_Collection

Inside of the Collection is a GEO_BOREHOLE, which is a cell. A circle with 5m radius.

The first initial placement of the first feature is for example a Planned type Borehole. Then another feature is added as a collection of the first one, called Staked type. Then a third Borehole is placed, also part of the initial one as a collective feature, called Drilled type.

So, it is 3 GEO_BOREHOLES placed as a GEO_BOREHOLES_Collection.

This collective feature has then one database record, one mslink.

I would like to have the XYZ coordinates, and mslink value so I can populate a seperate table, or seperate columns.

i.e.

Database Tables:

dbo.GEO_BOREHOLES (mslink, boreholeNumber, PlannedX, PlannedY, PlannedZ, StakedX, StakedY, StakedZ, DrilledX, DrilledY, DrilledZ)

I would like to get hold of the XYZ values in a VBA. 

I have the following code:

Dim locatedFeatureGroup As String
Dim locatedFeatureRootName As String
Dim oLocatedFeature As xft.Feature
Dim oLocatedFeature2 As xft.Feature
Dim testDBLinks() As DatabaseLink
locatedFeatureGroup = xft.CmdMgr.GetProperty("locatedFeatureGroupName")
locatedFeatureRootName = xft.CmdMgr.GetProperty("locatedFeatureRootName")
Set oLocatedFeature = xft.FeatureMgr.LoadFeatureFromList(locatedFeatureGroup, locatedFeatureRootName)
Set oLocatedFeature2 = oLocatedFeature.GetSubFeature(0)
testDBLinks = oLocatedFeature.Geometry.GetDatabaseLinks 'ERROR MESSAGE HERE


Parents
  • I suspect the error is being caused by the fact that in an XFM feature collection, the root feature does not contain any geometry. The root feature acts as a "container" which only holds references to all of the "member" sub-feature instances. Depending on your feature class definition, there may be a couple of ways to implement this.

    Could you provide a copy of your schema along with a sample design file as well as cell library? If you could provide a small Microsoft SQL server backup (or equivalent Microsoft Access database) that would be helpful as well. Please follow these guidelines for posting to our FTP site and notify me once posting has been completed.

    Regards,

    Jeff Bielefeld [Bentley]



Reply
  • I suspect the error is being caused by the fact that in an XFM feature collection, the root feature does not contain any geometry. The root feature acts as a "container" which only holds references to all of the "member" sub-feature instances. Depending on your feature class definition, there may be a couple of ways to implement this.

    Could you provide a copy of your schema along with a sample design file as well as cell library? If you could provide a small Microsoft SQL server backup (or equivalent Microsoft Access database) that would be helpful as well. Please follow these guidelines for posting to our FTP site and notify me once posting has been completed.

    Regards,

    Jeff Bielefeld [Bentley]



Children
No Data