Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using UF_Part_New to Create new part withoute an Inerface 'new dialog'

Status
Not open for further replies.

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
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor