Cancel
Showing results for 
Search instead for 
Did you mean: 

How to get parent line of point set ?

Creator
Creator

Hello,

 

I am a little confused of this topic : https://community.plm.autom.....

 

Tried to adopt such solution to get a parent line from point set. Unortunately it failed.

 

I think the main reason is becouse Point Set is a Feature type and what is need there is SmartObject.

 

Checked both functions:

theUF.Modl.AskObject(pointTag, out parents);
theUF.So.AskParents(pointTag, UFConstants.UF_SO_ASK_ALL_PARENTS, out n_parents, out parents);

Both failed.

 

 

Is there anyway around ? 

 

jilsu

4 REPLIES 4

Re: How to get parent line of point set ?

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

The point set feature has a .GetSections method that will return the parent section objects from which you can get the curve objects.

Re: How to get parent line of point set ?

Creator
Creator

I going to test this. 

 

 

Maybe could you give an additional tip on how to get numer of points in Point Set?

 

------------------

EDIT:

 

@cowski1 u had right. The way you showed me worked ! 

 

For others who will look on that post: There is a method called GetOutputCurves in NXOpen.Section namespace, which gives you a parent (spline - worked, maybe edge - I didnt tested) of PointSet.

 

 

Re: How to get parent line of point set ?

Siemens Phenom Siemens Phenom
Siemens Phenom
@jilsu wrote:

Maybe could you give an additional tip on how to get numer of points in Point Set?


Did you have a look into NXOpen.Features.PointSet Class Reference yet?

 

NXOpen.Point[] NXOpen.Features.PointSet.GetPoints()
Returns the points created by the point set feature.

 

The number of points is available with the .NET Array.Length property.

Re: How to get parent line of point set ?

Creator
Creator

@Beetle wrote:
@jilsu wrote:

Maybe could you give an additional tip on how to get numer of points in Point Set?


Did you have a look into NXOpen.Features.PointSet Class Reference yet?

 

NXOpen.Point[] NXOpen.Features.PointSet.GetPoints()
Returns the points created by the point set feature.

 

The number of points is the available with the .NET Array.Length property.


Great! I had to miss this somehow. Its really helpfull.