Anuncios

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

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

hx
Advocate

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 Me gusta
Responder
Soluciones aceptadas (1)
514 Vistas
1 Respuesta
Respuesta (1)

hx
Advocate
Advocate
Solución aceptada

I fixed the code.

 

the array subscript is begin in 1 not 0.

0 Me gusta