Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

hx
Advocate
513 Vistas, 1 Respuesta

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

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.

 

 

hx
Advocate
en respuesta a: hx

I fixed the code.

 

the array subscript is begin in 1 not 0.