Hi
This example is for master part.
I need help to modify it to be for non-master part.
Thank you.
This example is for master part.
I need help to modify it to be for non-master part.
Thank you.
Code:
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.UI
Imports NXOpenUI
Imports NXOpen.Utilities
Module create_new_nxmanager_part_from_template
Public s As Session = Session.GetSession()
Public ufs As UFSession = UFSession.GetUFSession()
Public lw As ListingWindow = s.ListingWindow
Sub Main()
Dim encodedName As String = ""
Dim encodedTemplateName As String = "@DB/Metric/A"
Dim partFileName As String = ""
Dim partTag As NXOpen.Tag = NXOpen.Tag.Null
Dim partNumber As String = ""
Dim partRev As String = ""
Dim partType As String = "Item"
partNumber = NXInputBox.GetInputString("Part Number:", _
"User Input:", "Part Number")
partRev = NXInputBox.GetInputString("Revision:", _
"User Input:", "A")
partType = NXInputBox.GetInputString("Part Type:", _
"User Input:", partType)
encodedName = "@DB/" + partNumber + "/" + partRev
ufs.Ugmgr.NewPartFromTemplate(encodedName, partType, _
encodedTemplateName, partTag)
End Sub
Public Function GetUnloadOption(ByVal dummy As String) As Integer
Return Session.LibraryUnloadOption.Immediately
End Function
End Module