biw01
Automotive
- Dec 31, 2011
- 152
Hello Everyone.
How can i get the edge blend radius using NXOpen Code ?
Thanks and Regards,
Amitabh
How can i get the edge blend radius using NXOpen Code ?
Thanks and Regards,
Amitabh
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.Features
Module BlendInfo
Sub Main()
Dim s As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession()
Dim lw As ListingWindow = s.ListingWindow
Dim dp As Part = s.Parts.Work
Dim exps() As Expression
Dim expression_name As String = Nothing
Dim featcoll As FeatureCollection = dp.Features
Dim index1 As Integer = 0
lw.Open()
For Each f As Feature In featcoll
' lw.WriteLine("Feature Type: " & f.FeatureType.ToString)
If f.FeatureType = "BLEND" Then
exps = f.GetExpressions()
For Each exp As Expression In exps
expression_name = exp.Description
index1 = expression_name.IndexOf("Radius")
If index1 > 0 Then
lw.WriteLine(f.FeatureType.ToString & " Radius: " & exp.RightHandSide.ToString)
End If
Next
ElseIf f.FeatureType = "FACE_BLEND" Then
exps = f.GetExpressions()
For Each exp As Expression In exps
expression_name = exp.Description
index1 = expression_name.IndexOf("Radius")
If index1 > 0 Then
lw.WriteLine(f.FeatureType.ToString & " Radius: " & exp.RightHandSide.ToString)
End If
Next
End If
Next
End Sub
Public Function GetUnloadOption(ByVal dummy As String) As Integer
'Unloads the image immediately after execution within NX
GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately
End Function
End Module