Using VB.NET getting the features item's name.

Using VB.NET getting the features item's name.

hx
Advocate Advocate
610 Views
1 Reply
Message 1 of 2

Using VB.NET getting the features item's name.

hx
Advocate
Advocate

At the Visual Studio 2010, I add reference to FeatureCAM 2016

 

I write the code belower to get the feature names.

 

Dim doc As FeatureCAM.FMDocument = fc.ActiveDocument
For f As Integer = 0 To doc.Features.Count - 1
  Dim docFeatrue As FeatureCAM.FMFeature = doc.Features.Item(i)
  MsgBox(docFeatrue.Name)
Next

 

But when I debug the code ,it tell me the docFeatrure is nothing.

How can I fix this code.

 

 

0 Likes
Accepted solutions (1)
611 Views
1 Reply
Reply (1)
Message 2 of 2

hx
Advocate
Advocate
Accepted solution

I fixed the code.

 

the array subscript is begin in 1 not 0.

0 Likes