Hi, I need help collecting points from a feature group.
I have several points in several feature groups.
I need to collect those points (in the: whatCurves() ) for each feature group.
I have actual working code were I hve to select points, and then use them in my journal... but I thought getting them with a journal wouldn be that hard...
I am trying to adapt codes I found, but cant get what is wrong.
thanks!
For Each tempFeat As Features.Feature In wp.Features
If TypeOf (tempFeat) Is Features.FeatureGroup Then
Dim featname As String = tempFeat.GetFeatureName
Dim numFeatures As Integer
Dim setFeatureTags() As Tag
theUfSession.Modl.AskAllMembersOfSet(tempFeat.Tag, setFeatureTags, numFeatures)
Dim setFeatures As New List(Of Features.Feature)
Dim whatCurves() As Point
Dim curveList As ArrayList = New ArrayList
''get features from tags
For Each tempTag As Tag In setFeatureTags
setFeatures.Add(Utilities.NXObjectManager.Get(tempTag))
Next
For Each setFeat As Features.Feature In setFeatures
if setFeat.FeatureType = "POINT" then
whatCurves = curveList.Add(setFeat) '>>>> here error
End if
Next
''' then I will work with whatCurves..
Done!
Done!
For Each tempFeat As Features.Feature In wp.Features
If TypeOf (tempFeat) Is Features.FeatureGroup Then
Dim featname As String = tempFeat.Name
Dim numFeatures As Integer
Dim setFeatureTags() As Tag
theUfSession.Modl.AskAllMembersOfSet(tempFeat.Tag, setFeatureTags, numFeatures)
Dim setFeatures As New List(Of Features.Feature)
Dim selected () As NXObject
Dim whatCurves() As Point
Dim pointList As ArrayList = New ArrayList
''get features from tags
For Each tempTag As Tag In setFeatureTags
setFeatures.Add(Utilities.NXObjectManager.Get(tempTag))
Next
For Each setFeat As Features.Feature In setFeatures
if setFeat.FeatureType = "POINT" then
Dim nxObj() As NXObject = setFeat.GetEntities
Dim thePt As Point = nxObj(0)
End if
For Each aPoint As NXObject In setFeat.GetEntities
pointList.Add(aPoint)
Next
Next
whatCurves = pointList.ToArray(GetType(Point))