Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

How to get a list of pointset members?

Builder
Builder

Hello,

I have a pointset which consists of some points along a spline. How can I get a list of point tags associated to that feature?

Thanks

8 REPLIES

Re: How to get a list of pointset members?

Genius
Genius

Hi @metinmehel

 

Post the any one of its point information.

 

::Smiley SurprisedPTIMUS_PRIME

Re: How to get a list of pointset members?

Builder
Builder
------------------------------------------------------------

pointset1(292)
------------------------------------------------------------
p16=120 120
Number Of Points

p19=0 0
Start Percentage

p20=100 100
End Percentage


Feature Parameters for: pointset1(292)
------------------------------------------------------------
Feature Type - Point Set(292)
Number Of Points = 120.000000000
Start Percentage = 0.000000000
End Percentage = 100.000000000

Feature Associativity for: pointset1(292)
------------------------------------------------------------

Parent(s):

Join Curve(289)




============================================================

Re: How to get a list of pointset members?

Gears Honored Contributor Gears Honored Contributor
Gears Honored Contributor

Re: How to get a list of pointset members?

Builder
Builder
In my case I have a pointset builder " inputPointSetBuilder" but I can not convert it to a feature to use .getentities

inputPointSetBuilder.SingleCurveOrEdgeCollector.AddToSection(rules1, spline1, nullNXObject, nullNXObject, helpPoint1, Section.Mode.Create, False)

is there any suggestion to this?

Re: How to get a list of pointset members?

Gears Honored Contributor Gears Honored Contributor
Gears Honored Contributor

Once you call the .Commit method on the point set builder, it will create a point set feature, does it not?

The .Commit method will return the point set feature and you can then call the .GetEntities method of the returned feature.

Re: How to get a list of pointset members?

Builder
Builder
 Dim point_set As NXObject
        point_set = inputPointSetBuilder.Commit()
 Dim mypoints() As NXObject = point_set.GetEntities()
        For Each tempPt As Point In mypoints
            lw.WriteLine(tempPt.Coordinates.ToString)
        Next

I get en error "GetEntities" is not a member of "NXOpen.NXObject"

Re: How to get a list of pointset members?

Genius
Genius

@metinmehel

Try this step

1.Collect all point in the model.

2. Seperataly get the spline tag

Now check for the parent feature of all point which will return the spline tag.

 

keep hold of those points..

 

::Smiley SurprisedPTIMUS_PRIME

Re: How to get a list of pointset members?

Gears Honored Contributor Gears Honored Contributor
Gears Honored Contributor
 Dim point_set As Features.PointSet
        point_set = inputPointSetBuilder.Commit()
 Dim mypoints() As NXObject = point_set.GetEntities()
        For Each tempPt As Point In mypoints
            lw.WriteLine(tempPt.Coordinates.ToString)
        Next