Here is a journal that basically does what you need. Your code tried to use features to move. Now features are not displayable objects and therefore features do not have layer property. What you basically need to do is cycle through the component parts, set it as the work part and then...
To change a spline from degree 1 to a degree 3 spline I suggest you try the following.
For a given spline
1) Create a point set of type = Spline Points and subtype = Poles
2) Create a fit curve using
type = Fit Spline
Select the point set created
Parameterization Method = Degree and...
Can I suggest you set the tolerance to a larger value say 0.01. The output the maximum error and the point at which the maximum error occurs.
I ran your data with no slope control then the maximum error was 0.008 at point 4 (point numbers 1 to 7)
I then ran it using your end slopes and the...
Here is a journal than worked on your part.
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpenUI
Imports NXOpen.UF
Imports NXOpen.Utilities
Imports NXOpen.Features
Module SingleSurfaceCentreLine
Dim s As Session = Session.GetSession()
Dim ui As UI = ui.GetUI()
Dim ufs...
My latest program did not allow for faces that are open in one direction. That is if the cylindrical surface is made up of say two 180 degree arc faces then the program will not work. If this is what you are referring to please let us know this and I can looking at adding it to the program...
Here is a journal that goes part of the way for what I think you want. The journal ask you to select a face. The journal then gets all edges of that selected face. Then for each edge we get the adjacent faces and checking for a point on the edge I get the normal on both faces at this point...
Here is a journal that creates splines based on two points and two slopes.
I should point a few limitations. This journal only works for NX7.5 because the studio spline function is quite different for NX8 +. I have used a simpler approach in that the user is asked to make 4 selections. The...
Here is the modified journal to take into account multiple line labels
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpenUI
Imports NXOpen.Utilities
Imports NXOpen.Annotations
Module GetWordInfo
Dim s As Session = Session.GetSession()
Dim ufs As UFSession...
Below is the changed code so that Apply or OK does not cause an error.
When I write journals they are typically concept journals to demonstrate that a user requirement is possible. I NEVER include all necessary code to cover all conditions or user methods. For example this updated journal...
Here is the complete journal.
'Author: Frank Swinkels
'for use only with NX 8.5 or above
'Create approximate centerline of B-surface "tube"
'user will be prompted to select B-surface, a 'through points' studio spline will be created along the centerline
' modified June 19, 2014 to include...
To create the BSurface make the following changes to your journal
1. Add the following dim lines
Dim extractedfeat1 As Feature = Nothing
Dim extractedbodyfeat1 As BodyFeature = Nothing
Dim extractedbody1() As Body = Nothing
Dim faces() As Face
2. Change the first try catch in main to read...
Attached is a part in which I created what I think you are looking for. I then created a udf and inserted a second hole. What I have done different is that I have used a projected point from which I then create the lower simple hole.
Frank Swinkels...
I took another look at this. First I assume you are using NX8.5? My code is using VB.
After the fitcurve has been created you can get the feature like this
Dim fitcurvefeat As features.feature = fitCurveBuilder1.getfeature
Hope this helps.
Frank Swinkels
The commit method for fitcurvebuilder indicates that "Commits any edits that have been applied to the builder". If you want to access the fitcurve feature then use the CommitFeature method.