Ehaviv
Computer
- Jul 2, 2003
- 1,012
Hi
I'm trying to create new part without an Inerface 'new dialog'.
but I get this error:
'Line 27: 'NXOpen.UF.UFPart.Friend Sub New()' is not accessibile in this context because it is 'Friend'.
PLEASE CAN SOMEONE HELP.
This is the journal I'm using
Thank you.
I'm trying to create new part without an Inerface 'new dialog'.
but I get this error:
'Line 27: 'NXOpen.UF.UFPart.Friend Sub New()' is not accessibile in this context because it is 'Friend'.
PLEASE CAN SOMEONE HELP.
This is the journal I'm using
Code:
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Module create_new_part_uf_part_new
Sub Main()
Dim s As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession
Dim theUI As UI = UI.GetUI
Dim lw As ListingWindow = s.ListingWindow()
Dim workPart As NXOpen.Part
Dim displayPart As NXOpen.Part
Dim part_name As String
Dim part_tag As Tag
Dim units As Integer = 1
part_name = "a1b2c3d4e5f6"
Try
ufs.Part.New(part_name, units, part_tag)
Catch
End Try
End Sub
Public Function GetUnloadOption(ByVal dummy As String) As Integer
GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately
End Function
End Module
Thank you.