good morning,
I write this code to edit with a form the attribute of my NX parts.
With the attribute I compile the table in the draft.
I would ask if is possible to edit the attribute of the reference set, because I Can compile the table draft with the attribute of reference set or the attribute of the part...
Someone can help me to edit this code, for edit the property of the selected referenceset...
Thanks a lot
Option Strict Off
Imports System
Imports NXOpen
'AUTORE
Module Module1
Private Const _attributeTitle As String = "DESCRIZIONE"
Public ReadOnly Property AttributeTitle() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue As String = ""
Public Property AttributeValue() As String
Get
Return _attributeValue
End Get
Set(ByVal value As String)
_attributeValue = value
End Set
End Property
Private Const _attributeTitle1 As String = "DESCRIZIONEAGG"
Public ReadOnly Property AttributeTitle1() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue1 As String = ""
Public Property AttributeValue1() As String
Get
Return _attributeValue1
End Get
Set(ByVal value1 As String)
_attributeValue1 = value1
End Set
End Property
Private Const _attributeTitle3 As String = "CODICEASS"
Public ReadOnly Property AttributeTitle3() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue3 As String = ""
Public Property AttributeValue3() As String
Get
Return _attributeValue3
End Get
Set(ByVal value3 As String)
_attributeValue3 = value3
End Set
End Property
Private Const _attributeTitle4 As String = "CODICEASSREV"
Public ReadOnly Property AttributeTitle4() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue4 As String = ""
Public Property AttributeValue4() As String
Get
Return _attributeValue4
End Get
Set(ByVal value4 As String)
_attributeValue4 = value4
End Set
End Property
'&&&&&
Private Const _attributeTitle5 As String = "CODICEDWG"
Public ReadOnly Property AttributeTitle5() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue5 As String = ""
Public Property AttributeValue5() As String
Get
Return _attributeValue5
End Get
Set(ByVal value5 As String)
_attributeValue5 = value5
End Set
End Property
Private Const _attributeTitle6 As String = "CODICEDWGREV"
Public ReadOnly Property AttributeTitle6() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue6 As String = ""
Public Property AttributeValue6() As String
Get
Return _attributeValue6
End Get
Set(ByVal value6 As String)
_attributeValue6 = value6
End Set
End Property
Private Const _attributeTitle7 As String = "CODICEPAR"
Public ReadOnly Property AttributeTitle7() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue7 As String = ""
Public Property AttributeValue7() As String
Get
Return _attributeValue7
End Get
Set(ByVal value7 As String)
_attributeValue7 = value7
End Set
End Property
Private Const _attributeTitle8 As String = "CODICEPARREV"
Public ReadOnly Property AttributeTitle8() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue8 As String = ""
Public Property AttributeValue8() As String
Get
Return _attributeValue8
End Get
Set(ByVal value8 As String)
_attributeValue8 = value8
End Set
End Property
Private Const _attributeTitle9 As String = "COMMENTI"
Public ReadOnly Property AttributeTitle9() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue9 As String = ""
Public Property AttributeValue9() As String
Get
Return _attributeValue9
End Get
Set(ByVal value9 As String)
_attributeValue9 = value9
End Set
End Property
Private Const _attributeTitle10 As String = "NOTE"
Public ReadOnly Property AttributeTitle10() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue10 As String = ""
Public Property AttributeValue10() As String
Get
Return _attributeValue10
End Get
Set(ByVal value10 As String)
_attributeValue10 = value10
End Set
End Property
Private Const _attributeTitle11 As String = "TRATTAMENTO"
Public ReadOnly Property AttributeTitle11() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue11 As String = ""
Public Property AttributeValue11() As String
Get
Return _attributeValue11
End Get
Set(ByVal value11 As String)
_attributeValue11 = value11
End Set
End Property
Private Const _attributeTitle12 As String = "AUTORE"
Public ReadOnly Property AttributeTitle12() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue12 As String = "UTE"
Public Property AttributeValue12() As String
Get
Return _attributeValue12
End Get
Set(ByVal value12 As String)
_attributeValue12 = value12
End Set
End Property
'&&&&&
Sub Main()
Dim theSession As Session = Session.GetSession()
If IsNothing(theSession.Parts.Work) Then
'active part required
Return
End If
Dim workPart As Part = theSession.Parts.Work
Dim lw As ListingWindow = theSession.ListingWindow
lw.Open()
Const undoMarkName As String = "NXJ form demo journal"
Dim markId1 As Session.UndoMarkId
markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, undoMarkName)
Dim myAttributeInfo As NXObject.AttributeInformation
Try
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle, NXObject.AttributeType.String, -1)
_attributeValue = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle1, NXObject.AttributeType.String, -1)
_attributeValue1 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle3, NXObject.AttributeType.String, -1)
_attributeValue3 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle4, NXObject.AttributeType.String, -1)
_attributeValue4 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle5, NXObject.AttributeType.String, -1)
_attributeValue5 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle6, NXObject.AttributeType.String, -1)
_attributeValue6 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle7, NXObject.AttributeType.String, -1)
_attributeValue7 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle8, NXObject.AttributeType.String, -1)
_attributeValue8 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle9, NXObject.AttributeType.String, -1)
_attributeValue9 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle10, NXObject.AttributeType.String, -1)
_attributeValue10 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle11, NXObject.AttributeType.String, -1)
_attributeValue11 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle12, NXObject.AttributeType.String, -1)
_attributeValue12 = myAttributeInfo.StringValue
Catch ex As NXException
If ex.ErrorCode = 512008 Then
'attribute not found
Else
'unexpected error: show error message, undo, and exit journal
MsgBox(ex.ErrorCode & ": " & ex.Message)
theSession.UndoToMark(markId1, undoMarkName)
Return
End If
Finally
End Try
'create new form object
Dim myForm As New Form1
'set form object properties (current part attribute title and value)
myForm.AttributeTitle = _attributeTitle
myForm.AttributeValue = _attributeValue
myForm.AttributeTitle1 = _attributeTitle1
myForm.AttributeValue1 = _attributeValue1
myForm.AttributeTitle3 = _attributeTitle3
myForm.AttributeValue3 = _attributeValue3
myForm.AttributeTitle4 = _attributeTitle4
myForm.AttributeValue4 = _attributeValue4
myForm.AttributeTitle5 = _attributeTitle5
myForm.AttributeValue5 = _attributeValue5
myForm.AttributeTitle6 = _attributeTitle6
myForm.AttributeValue6 = _attributeValue6
myForm.AttributeTitle7 = _attributeTitle7
myForm.AttributeValue7 = _attributeValue7
myForm.AttributeTitle8 = _attributeTitle8
myForm.AttributeValue8 = _attributeValue8
myForm.AttributeTitle9 = _attributeTitle9
myForm.AttributeValue9 = _attributeValue9
myForm.AttributeTitle10 = _attributeTitle10
myForm.AttributeValue10 = _attributeValue10
myForm.AttributeTitle11 = _attributeTitle11
myForm.AttributeValue11 = _attributeValue11
myForm.AttributeTitle12 = _attributeTitle12
myForm.AttributeValue12 = _attributeValue12
'display our form
myForm.ShowDialog()
If myForm.Canceled Then
'user pressed cancel, exit journal
Return
Else
'user pressed OK, assign value from form to part attribute
_attributeValue = myForm.AttributeValue
workPart.SetUserAttribute(_attributeTitle, -1, _attributeValue, Update.Option.Later)
_attributeValue1 = myForm.AttributeValue1
workPart.SetUserAttribute(_attributeTitle1, -1, _attributeValue1, Update.Option.Later)
_attributeValue3 = myForm.AttributeValue3
workPart.SetUserAttribute(_attributeTitle3, -1, _attributeValue3, Update.Option.Later)
_attributeValue4 = myForm.AttributeValue4
workPart.SetUserAttribute(_attributeTitle4, -1, _attributeValue4, Update.Option.Later)
_attributeValue5 = myForm.AttributeValue5
workPart.SetUserAttribute(_attributeTitle5, -1, _attributeValue5, Update.Option.Later)
_attributeValue6 = myForm.AttributeValue6
workPart.SetUserAttribute(_attributeTitle6, -1, _attributeValue6, Update.Option.Later)
_attributeValue7 = myForm.AttributeValue7
workPart.SetUserAttribute(_attributeTitle7, -1, _attributeValue7, Update.Option.Later)
_attributeValue8 = myForm.AttributeValue8
workPart.SetUserAttribute(_attributeTitle8, -1, _attributeValue8, Update.Option.Later)
_attributeValue9 = myForm.AttributeValue9
workPart.SetUserAttribute(_attributeTitle9, -1, _attributeValue9, Update.Option.Later)
_attributeValue10 = myForm.AttributeValue10
workPart.SetUserAttribute(_attributeTitle10, -1, _attributeValue10, Update.Option.Later)
_attributeValue11 = myForm.AttributeValue11
workPart.SetUserAttribute(_attributeTitle11, -1, _attributeValue11, Update.Option.Later)
_attributeValue12 = myForm.AttributeValue12
workPart.SetUserAttribute(_attributeTitle12, -1, _attributeValue12, Update.Option.Later)
End If
lw.Close()
End Sub
Public Function GetUnloadOption(ByVal dummy As String) As Integer
'Unloads the image when the NX session terminates
'GetUnloadOption = NXOpen.Session.LibraryUnloadOption.AtTermination
'----Other unload options-------
'Unloads the image immediately after execution within NX
GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately
'Unloads the image explicitly, via an unload dialog
'GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Explicitly
'-------------------------------
End Function
End Module
Public Class Form1
Private _frmAttributeTitle As String
Public Property AttributeTitle() As String
Get
Return _frmAttributeTitle
End Get
Set(ByVal value As String)
_frmAttributeTitle = value
End Set
End Property
Private _frmAttributeValue As String
Public Property AttributeValue() As String
Get
Return _frmAttributeValue
End Get
Set(ByVal value As String)
_frmAttributeValue = value
End Set
End Property
''
Private _frmAttributeTitle1 As String
Public Property AttributeTitle1() As String
Get
Return _frmAttributeTitle1
End Get
Set(ByVal value As String)
_frmAttributeTitle1 = value
End Set
End Property
Private _frmAttributeValue1 As String
Public Property AttributeValue1() As String
Get
Return _frmAttributeValue1
End Get
Set(ByVal value As String)
_frmAttributeValue1 = value
End Set
End Property
''
Private _frmAttributeTitle3 As String
Public Property AttributeTitle3() As String
Get
Return _frmAttributeTitle3
End Get
Set(ByVal value As String)
_frmAttributeTitle3 = value
End Set
End Property
Private _frmAttributeValue3 As String
Public Property AttributeValue3() As String
Get
Return _frmAttributeValue3
End Get
Set(ByVal value As String)
_frmAttributeValue3 = value
End Set
End Property
Private _frmAttributeTitle4 As String
Public Property AttributeTitle4() As String
Get
Return _frmAttributeTitle4
End Get
Set(ByVal value As String)
_frmAttributeTitle4 = value
End Set
End Property
Private _frmAttributeValue4 As String
Public Property AttributeValue4() As String
Get
Return _frmAttributeValue4
End Get
Set(ByVal value As String)
_frmAttributeValue4 = value
End Set
End Property
''&&&&&&
Private _frmAttributeTitle5 As String
Public Property AttributeTitle5() As String
Get
Return _frmAttributeTitle5
End Get
Set(ByVal value As String)
_frmAttributeTitle5 = value
End Set
End Property
Private _frmAttributeValue5 As String
Public Property AttributeValue5() As String
Get
Return _frmAttributeValue5
End Get
Set(ByVal value As String)
_frmAttributeValue5 = value
End Set
End Property
Private _frmAttributeTitle6 As String
Public Property AttributeTitle6() As String
Get
Return _frmAttributeTitle6
End Get
Set(ByVal value As String)
_frmAttributeTitle6 = value
End Set
End Property
Private _frmAttributeValue6 As String
Public Property AttributeValue6() As String
Get
Return _frmAttributeValue6
End Get
Set(ByVal value As String)
_frmAttributeValue6 = value
End Set
End Property
Private _frmAttributeTitle7 As String
Public Property AttributeTitle7() As String
Get
Return _frmAttributeTitle7
End Get
Set(ByVal value As String)
_frmAttributeTitle7 = value
End Set
End Property
Private _frmAttributeValue7 As String
Public Property AttributeValue7() As String
Get
Return _frmAttributeValue7
End Get
Set(ByVal value As String)
_frmAttributeValue7 = value
End Set
End Property
'
'
'
'
Private _frmAttributeTitle8 As String
Public Property AttributeTitle8() As String
Get
Return _frmAttributeTitle8
End Get
Set(ByVal value As String)
_frmAttributeTitle8 = value
End Set
End Property
Private _frmAttributeValue8 As String
Public Property AttributeValue8() As String
Get
Return _frmAttributeValue8
End Get
Set(ByVal value As String)
_frmAttributeValue8 = value
End Set
End Property
'
'
'
'
Private _frmAttributeTitle9 As String
Public Property AttributeTitle9() As String
Get
Return _frmAttributeTitle9
End Get
Set(ByVal value As String)
_frmAttributeTitle9 = value
End Set
End Property
Private _frmAttributeValue9 As String
Public Property AttributeValue9() As String
Get
Return _frmAttributeValue9
End Get
Set(ByVal value As String)
_frmAttributeValue9 = value
End Set
End Property
'
'
'
'
Private _frmAttributeTitle10 As String
Public Property AttributeTitle10() As String
Get
Return _frmAttributeTitle10
End Get
Set(ByVal value As String)
_frmAttributeTitle10 = value
End Set
End Property
Private _frmAttributeValue10 As String
Public Property AttributeValue10() As String
Get
Return _frmAttributeValue10
End Get
Set(ByVal value As String)
_frmAttributeValue10 = value
End Set
End Property
'
'
'
'
Private _frmAttributeTitle11 As String
Public Property AttributeTitle11() As String
Get
Return _frmAttributeTitle11
End Get
Set(ByVal value As String)
_frmAttributeTitle11 = value
End Set
End Property
Private _frmAttributeValue11 As String
Public Property AttributeValue11() As String
Get
Return _frmAttributeValue11
End Get
Set(ByVal value As String)
_frmAttributeValue11 = value
End Set
End Property
'
'
'
'
Private _frmAttributeTitle12 As String
Public Property AttributeTitle12() As String
Get
Return _frmAttributeTitle12
End Get
Set(ByVal value As String)
_frmAttributeTitle12 = value
End Set
End Property
Private _frmAttributeValue12 As String
Public Property AttributeValue12() As String
Get
Return _frmAttributeValue12
End Get
Set(ByVal value As String)
_frmAttributeValue12 = value
End Set
End Property
''&&&&&&
Private _canceled As Boolean = False
Public ReadOnly Property Canceled() As Boolean
Get
Return _canceled
End Get
End Property
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label1.Text = _frmAttributeTitle
TextBox1.Text = _frmAttributeValue
End Sub
Private Sub Form2_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label2.Text = _frmAttributeTitle1
TextBox2.Text = _frmAttributeValue1
End Sub
Private Sub Form3_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label3.Text = _frmAttributeTitle3
TextBox3.Text = _frmAttributeValue3
End Sub
Private Sub Form4_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label4.Text = _frmAttributeTitle4
TextBox4.Text = _frmAttributeValue4
End Sub
Private Sub Form5_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label5.Text = _frmAttributeTitle5
TextBox5.Text = _frmAttributeValue5
End Sub
Private Sub Form6_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label6.Text = _frmAttributeTitle6
TextBox6.Text = _frmAttributeValue6
End Sub
Private Sub Form7_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label7.Text = _frmAttributeTitle7
TextBox7.Text = _frmAttributeValue7
End Sub
Private Sub Form8_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label8.Text = _frmAttributeTitle8
TextBox8.Text = _frmAttributeValue8
End Sub
Private Sub Form9_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label9.Text = _frmAttributeTitle9
TextBox9.Text = _frmAttributeValue9
End Sub
Private Sub Form10_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label10.Text = _frmAttributeTitle10
TextBox10.Text = _frmAttributeValue10
End Sub
Private Sub Form11_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label11.Text = _frmAttributeTitle11
TextBox11.Text = _frmAttributeValue11
End Sub
Private Sub Form12_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label12.Text = _frmAttributeTitle12
TextBox12.Text = _frmAttributeValue12
End Sub
Private Sub btnCancel_Click(sender As System.Object, e As System.EventArgs) Handles btnCancel.Click
_canceled = True
Me.Close()
End Sub
Private Sub btnOK_Click(sender As System.Object, e As System.EventArgs) Handles btnOK.Click
_frmAttributeValue = TextBox1.Text.ToUpper
_frmAttributeValue1 = TextBox2.Text.ToUpper
_frmAttributeValue3 = TextBox3.Text.ToUpper
_frmAttributeValue4 = TextBox4.Text.ToUpper
_frmAttributeValue5 = TextBox5.Text.ToUpper
_frmAttributeValue6 = TextBox6.Text.ToUpper
_frmAttributeValue7 = TextBox7.Text.ToUpper
_frmAttributeValue8 = TextBox8.Text.ToUpper
_frmAttributeValue9 = TextBox9.Text.ToUpper
_frmAttributeValue10 = TextBox10.Text.ToUpper
_frmAttributeValue11 = TextBox11.Text.ToUpper
_frmAttributeValue12 = TextBox12.Text.ToUpper
Me.Close()
End Sub
End Class
'
'
'-------------------------------------------------------------------------------------
'
'
_
Partial Class Form1
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
_
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
_
Private Sub InitializeComponent()
Me.btnCancel = New System.Windows.Forms.Button()
Me.btnOK = New System.Windows.Forms.Button()
Me.Label1 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.Label5 = New System.Windows.Forms.Label()
Me.Label6 = New System.Windows.Forms.Label()
Me.Label7 = New System.Windows.Forms.Label()
Me.Label8 = New System.Windows.Forms.Label()
Me.Label9 = New System.Windows.Forms.Label()
Me.Label10 = New System.Windows.Forms.Label()
Me.Label11 = New System.Windows.Forms.Label()
Me.Label12 = New System.Windows.Forms.Label()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.TextBox2 = New System.Windows.Forms.TextBox()
Me.TextBox3 = New System.Windows.Forms.TextBox()
Me.TextBox4 = New System.Windows.Forms.TextBox()
Me.TextBox5 = New System.Windows.Forms.TextBox()
Me.TextBox6 = New System.Windows.Forms.TextBox()
Me.TextBox7 = New System.Windows.Forms.TextBox()
Me.TextBox8 = New System.Windows.Forms.TextBox()
Me.TextBox9 = New System.Windows.Forms.TextBox()
Me.TextBox10 = New System.Windows.Forms.TextBox()
Me.TextBox11 = New System.Windows.Forms.TextBox()
Me.TextBox12 = New System.Windows.Forms.TextBox()
Me.SuspendLayout()
'
'btnCancel
'
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.btnCancel.Location = New System.Drawing.Point(500, 400)
Me.btnCancel.Name = "btnCancel"
Me.btnCancel.Size = New System.Drawing.Size(75, 40)
Me.btnCancel.TabIndex = 98
Me.btnCancel.Text = "Cancel"
Me.btnCancel.UseVisualStyleBackColor = True
'
'btnOK
'
Me.btnOK.Location = New System.Drawing.Point(400, 400)
Me.btnOK.Name = "btnOK"
Me.btnOK.Size = New System.Drawing.Size(75, 40)
Me.btnOK.TabIndex = 99
Me.btnOK.Text = "Ok"
Me.btnOK.UseVisualStyleBackColor = True
'
'
'-------------------------------------------------------------------------------------
'
'
'Label1 DESCRIZIONE
'
Me.Label1.Location = New System.Drawing.Point(10, 170)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(120, 13)
Me.Label1.TabIndex = 2
Me.Label1.Text = "Label1"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label2 DESCRIZIONEAGG
'
Me.Label2.Location = New System.Drawing.Point(5, 210)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(125, 13)
Me.Label2.TabIndex = 2
Me.Label2.Text = "Label2"
Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label3 CODICEASS
'
Me.Label3.Location = New System.Drawing.Point(10, 50)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(120, 13)
Me.Label3.TabIndex = 2
Me.Label3.Text = "Label3"
Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label4 CODICEASSREV
'
Me.Label4.Location = New System.Drawing.Point(355, 50)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(120, 13)
Me.Label4.TabIndex = 2
Me.Label4.Text = "Label4"
Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label5 CODICEDWG
'
Me.Label5.Location = New System.Drawing.Point(10, 90)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(120, 13)
Me.Label5.TabIndex = 2
Me.Label5.Text = "Label5"
Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label6 CODICEDWGREV
'
Me.Label6.Location = New System.Drawing.Point(355, 90)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(120, 13)
Me.Label6.TabIndex = 2
Me.Label6.Text = "Label6"
Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label7 CODICEPAR
'
Me.Label7.Location = New System.Drawing.Point(10, 130)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(120, 13)
Me.Label7.TabIndex = 2
Me.Label7.Text = "Label7"
Me.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label8 CODICEPARREV
'
Me.Label8.Location = New System.Drawing.Point(355, 130)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(120, 13)
Me.Label8.TabIndex = 2
Me.Label8.Text = "Label8"
Me.Label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label9 COMMENTI
'
Me.Label9.Location = New System.Drawing.Point(10, 250)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(120, 13)
Me.Label9.TabIndex = 2
Me.Label9.Text = "Label9"
Me.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label10 NOTE
'
Me.Label10.Location = New System.Drawing.Point(10, 290)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(120, 13)
Me.Label10.TabIndex = 2
Me.Label10.Text = "Label10"
Me.Label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label11 TRATTAMENTO
'
Me.Label11.Location = New System.Drawing.Point(20, 330)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(120, 13)
Me.Label11.TabIndex = 22
Me.Label11.Text = "Label11"
Me.Label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label12 AUTORE
'
Me.Label12.Location = New System.Drawing.Point(20, 370)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(120, 13)
Me.Label12.TabIndex = 50
Me.Label12.Text = "Label12"
Me.Label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight '
'
'-------------------------------------------------------------------------------------
'
'
'TextBox1 DESCRIZIONE
'
Me.TextBox1.Location = New System.Drawing.Point(150, 170)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(430, 10)
Me.TextBox1.TabIndex = 7
'
'TextBox2 DESCRIZIONEAGG
'
Me.TextBox2.Location = New System.Drawing.Point(150, 210)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(430, 10)
Me.TextBox2.TabIndex = 8
'
'TextBox3 CODICEASS - riga 50
'
Me.TextBox3.Location = New System.Drawing.Point(150, 50)
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.Size = New System.Drawing.Size(210, 10)
Me.TextBox3.TabIndex = 0
'
'TextBox4 CODICEASSREV - riga 50
'
Me.TextBox4.Location = New System.Drawing.Point(480, 50)
Me.TextBox4.Name = "TextBox4"
Me.TextBox4.Size = New System.Drawing.Size(100, 10)
Me.TextBox4.TabIndex = 1
'
'TextBox5 CODICEDWG - riga 90
'
Me.TextBox5.Location = New System.Drawing.Point(150, 90)
Me.TextBox5.Name = "TextBox5"
Me.TextBox5.Size = New System.Drawing.Size(210, 10)
Me.TextBox5.TabIndex = 2
'
'TextBox6 CODICEDWGREV - riga 90
'
Me.TextBox6.Location = New System.Drawing.Point(480, 90)
Me.TextBox6.Name = "TextBox6"
Me.TextBox6.Size = New System.Drawing.Size(100, 10)
Me.TextBox6.TabIndex = 3
'
'TextBox7 CODICEPAR - riga 130
'
Me.TextBox7.Location = New System.Drawing.Point(150, 130)
Me.TextBox7.Name = "TextBox7"
Me.TextBox7.Size = New System.Drawing.Size(210, 10)
Me.TextBox7.TabIndex = 4
'
'TextBox8 CODICEPARREV - riga 130
'
Me.TextBox8.Location = New System.Drawing.Point(480, 130)
Me.TextBox8.Name = "TextBox8"
Me.TextBox8.Size = New System.Drawing.Size(100, 10)
Me.TextBox8.TabIndex = 5
'
'TextBox9 COMMENTI - riga 130
'
Me.TextBox9.Location = New System.Drawing.Point(150, 250)
Me.TextBox9.Name = "TextBox9"
Me.TextBox9.Size = New System.Drawing.Size(430, 10)
Me.TextBox9.TabIndex = 9
'
'TextBox10 NOTE - riga 130
'
Me.TextBox10.Location = New System.Drawing.Point(150, 290)
Me.TextBox10.Name = "TextBox10"
Me.TextBox10.Size = New System.Drawing.Size(430, 10)
Me.TextBox10.TabIndex = 10
'
'TextBox11 TRATTAMENTO - riga 130
'
Me.TextBox11.Location = New System.Drawing.Point(150, 330)
Me.TextBox11.Name = "TextBox11"
Me.TextBox11.Size = New System.Drawing.Size(430, 10)
Me.TextBox11.TabIndex = 11
'
'TextBox12 AUTORE - riga 130
'
Me.TextBox12.Location = New System.Drawing.Point(150, 370)
Me.TextBox12.Name = "TextBox12"
Me.TextBox12.Size = New System.Drawing.Size(430, 10)
Me.TextBox12.TabIndex = 51
'
'
'-------------------------------------------------------------------------------------
'
'
'
'Form1
'
Me.AcceptButton = Me.btnOK
Me.AutoScaleDimensions = New System.Drawing.SizeF(5.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.CancelButton = Me.btnCancel
Me.ClientSize = New System.Drawing.Size(620, 520)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.TextBox3)
Me.Controls.Add(Me.TextBox4)
Me.Controls.Add(Me.TextBox5)
Me.Controls.Add(Me.TextBox6)
Me.Controls.Add(Me.TextBox7)
Me.Controls.Add(Me.TextBox8)
Me.Controls.Add(Me.TextBox9)
Me.Controls.Add(Me.TextBox10)
Me.Controls.Add(Me.TextBox11)
Me.Controls.Add(Me.TextBox12)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.Label7)
Me.Controls.Add(Me.Label8)
Me.Controls.Add(Me.Label9)
Me.Controls.Add(Me.Label10)
Me.Controls.Add(Me.Label11)
Me.Controls.Add(Me.Label12)
Me.Controls.Add(Me.btnOK)
Me.Controls.Add(Me.btnCancel)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "Form177"
Me.Text = "COMPILAZIONE CARTIGLIO - GFM - "
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents btnCancel As System.Windows.Forms.Button
Friend WithEvents btnOK As System.Windows.Forms.Button
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents TextBox5 As System.Windows.Forms.TextBox
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents TextBox6 As System.Windows.Forms.TextBox
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents TextBox7 As System.Windows.Forms.TextBox
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents TextBox8 As System.Windows.Forms.TextBox
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents TextBox9 As System.Windows.Forms.TextBox
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents TextBox10 As System.Windows.Forms.TextBox
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents TextBox11 As System.Windows.Forms.TextBox
Friend WithEvents Label12 As System.Windows.Forms.Label
Friend WithEvents TextBox12 As System.Windows.Forms.TextBox
End Class
re: edit attribute of reference set
First you will need to get the desired reference set; once you have it, you can read and assign attributes in the same way that you do for the part.
The journal code below shows a way to get a reference set with a specific name (change the ref set name in code as needed).
Option Strict Off
Imports System
Imports System.Collections.Generic
Imports NXOpen
Module Module2
Sub Main()
Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim lw As ListingWindow = theSession.ListingWindow
lw.Open()
Dim theReferenceSet As ReferenceSet = Nothing
Dim refMembers(-1) As NXObject
Dim refSetObjsToRemove As New List(Of NXObject)
'%%%%%%%%%% Change the following line to point to the name of your reference set %%%%%%%%%%
Const whatRefSet As String = "SOME_REF_SET"
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Dim foundRefSet as boolean = False
For Each myRefSet As ReferenceSet In workPart.GetAllReferenceSets()
If myRefSet.Name.ToUpper() = whatRefSet.ToUpper Then
theReferenceSet = myRefSet
foundRefSet = True
exit for
End If
Next
if foundRefSet Then
lw.writeline("ref set found")
'code to add attribute to "myRefSet"
Else
lw.writeline("ref set NOT found")
end if
lw.Close()
End Sub
End Module
re: edit attribute of reference set
If the question is how to assign an attribute to the reference set, the code below shows one method. I recorded a journal while assigning a string attribute to a reference set, cleaned up the code and combined it with the code above.
Option Strict Off
Imports System
Imports NXOpen
Module assign_ref_set_attribute
Dim theSession As Session = Session.GetSession()
Dim lw As ListingWindow = theSession.ListingWindow
Sub Main()
If IsNothing(theSession.Parts.BaseWork) Then
'active part required
Return
End If
lw.Open()
'%%%%%%%%%% Change the following line to point to the name of your reference set %%%%%%%%%%
Const refSetName As String = "MODEL"
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Dim theReferenceSet As ReferenceSet = Nothing
'find the reference set with the given name in the work part
For Each myRefSet As ReferenceSet In theSession.Parts.Work.GetAllReferenceSets()
If myRefSet.Name.ToUpper() = refSetName.ToUpper Then
theReferenceSet = myRefSet
End If
Next
If IsNothing(theReferenceSet) Then
'not found in work part
lw.WriteLine("reference set with the name: '" & refSetName.ToUpper & "' was not found in the work part, journal exiting")
Return
End If
'create/update attribute of reference set
Dim attributePropertiesBuilder1 As NXOpen.AttributePropertiesBuilder = Nothing
attributePropertiesBuilder1 = theSession.AttributeManager.CreateAttributePropertiesBuilder(theSession.Parts.Work, {theReferenceSet}, NXOpen.AttributePropertiesBuilder.OperationType.None)
attributePropertiesBuilder1.DataType = NXOpen.AttributePropertiesBaseBuilder.DataTypeOptions.String
attributePropertiesBuilder1.LockOnSave = False
'change the title and value as desired before running journal
attributePropertiesBuilder1.Title = "TEST"
attributePropertiesBuilder1.StringValue = "TEST VALUE"
attributePropertiesBuilder1.IsArray = False
Dim id1 As NXOpen.Session.UndoMarkId = Nothing
id1 = theSession.GetNewestUndoMark(NXOpen.Session.MarkVisibility.Visible)
attributePropertiesBuilder1.Commit()
Dim nErrs1 As Integer = Nothing
nErrs1 = theSession.UpdateManager.DoUpdate(id1)
attributePropertiesBuilder1.Destroy()
theSession.DeleteUndoMark(id1, Nothing)
lw.Close()
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
Merge Your code with My code.
I tried to modify my code by merging part of yours into my code, and I can create the new attributes using your part of the code in the REFERENCE SET set...
In your opinion, is it possible to use the data set in my FORM? Thanks to anyone who wants to help me.
Option Strict Off
Imports System
Imports NXOpen
Module assign_ref_set_attribute
Dim theSession As Session = Session.GetSession()
Dim lw As ListingWindow = theSession.ListingWindow
'_define attribute_INFOR
Private Const _attributeTitle As String = "DESCRIZIONE"
Public ReadOnly Property AttributeTitle() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue As String = ""
Public Property AttributeValue() As String
Get
Return _attributeValue
End Get
Set(ByVal value As String)
_attributeValue = value
End Set
End Property
Private Const _attributeTitle1 As String = "DESCRIZIONEAGG"
Public ReadOnly Property AttributeTitle1() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue1 As String = ""
Public Property AttributeValue1() As String
Get
Return _attributeValue1
End Get
Set(ByVal value1 As String)
_attributeValue1 = value1
End Set
End Property
Private Const _attributeTitle3 As String = "CODICEASS"
Public ReadOnly Property AttributeTitle3() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue3 As String = ""
Public Property AttributeValue3() As String
Get
Return _attributeValue3
End Get
Set(ByVal value3 As String)
_attributeValue3 = value3
End Set
End Property
Private Const _attributeTitle4 As String = "CODICEASSREV"
Public ReadOnly Property AttributeTitle4() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue4 As String = ""
Public Property AttributeValue4() As String
Get
Return _attributeValue4
End Get
Set(ByVal value4 As String)
_attributeValue4 = value4
End Set
End Property
Private Const _attributeTitle5 As String = "CODICEDWG"
Public ReadOnly Property AttributeTitle5() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue5 As String = ""
Public Property AttributeValue5() As String
Get
Return _attributeValue5
End Get
Set(ByVal value5 As String)
_attributeValue5 = value5
End Set
End Property
Private Const _attributeTitle6 As String = "CODICEDWGREV"
Public ReadOnly Property AttributeTitle6() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue6 As String = ""
Public Property AttributeValue6() As String
Get
Return _attributeValue6
End Get
Set(ByVal value6 As String)
_attributeValue6 = value6
End Set
End Property
Private Const _attributeTitle7 As String = "CODICEPAR"
Public ReadOnly Property AttributeTitle7() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue7 As String = ""
Public Property AttributeValue7() As String
Get
Return _attributeValue7
End Get
Set(ByVal value7 As String)
_attributeValue7 = value7
End Set
End Property
Private Const _attributeTitle8 As String = "CODICEPARREV"
Public ReadOnly Property AttributeTitle8() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue8 As String = ""
Public Property AttributeValue8() As String
Get
Return _attributeValue8
End Get
Set(ByVal value8 As String)
_attributeValue8 = value8
End Set
End Property
Private Const _attributeTitle9 As String = "COMMENTI"
Public ReadOnly Property AttributeTitle9() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue9 As String = ""
Public Property AttributeValue9() As String
Get
Return _attributeValue9
End Get
Set(ByVal value9 As String)
_attributeValue9 = value9
End Set
End Property
Private Const _attributeTitle10 As String = "NOTE"
Public ReadOnly Property AttributeTitle10() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue10 As String = ""
Public Property AttributeValue10() As String
Get
Return _attributeValue10
End Get
Set(ByVal value10 As String)
_attributeValue10 = value10
End Set
End Property
Private Const _attributeTitle12 As String = "AUTORE"
Public ReadOnly Property AttributeTitle12() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue12 As String = "UTE"
Public Property AttributeValue12() As String
Get
Return _attributeValue12
End Get
Set(ByVal value12 As String)
_attributeValue12 = value12
End Set
End Property
Private Const _attributeTitle13 As String = "CONTROLLATO"
Public ReadOnly Property AttributeTitle13() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue13 As String = "..."
Public Property AttributeValue13() As String
Get
Return _attributeValue13
End Get
Set(ByVal value13 As String)
_attributeValue13 = value13
End Set
End Property
Private Const _attributeTitle14 As String = "VERIFICATO"
Public ReadOnly Property AttributeTitle14() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue14 As String = "..."
Public Property AttributeValue14() As String
Get
Return _attributeValue14
End Get
Set(ByVal value14 As String)
_attributeValue14 = value14
End Set
End Property
Private Const _attributeTitle11 As String = "TRATTAMENTO"
Public ReadOnly Property AttributeTitle11() As String
Get
Return _attributeTitle
End Get
End Property
Private _attributeValue11 As String = ""
Public Property AttributeValue11() As String
Get
Return _attributeValue11
End Get
Set(ByVal value11 As String)
_attributeValue11 = value11
End Set
End Property
Sub Main()
If IsNothing(theSession.Parts.Work) Then
'active part required
Return
End If
lw.Open()
'%%%%%%%%%% Change the following line to point to the name of your reference set %%%%%%%%%%
Const refSetName As String = "F3"
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Dim theReferenceSet As ReferenceSet = Nothing
'find the reference set with the given name in the work part
For Each myRefSet As ReferenceSet In theSession.Parts.Work.GetAllReferenceSets()
If myRefSet.Name.ToUpper() = refSetName.ToUpper Then
theReferenceSet = myRefSet
End If
Next
If IsNothing(theReferenceSet) Then
'not found in work part
lw.WriteLine("reference set with the name: '" & refSetName.ToUpper & "' was not found in the work part, journal exiting")
Return
End If
'create/update attribute of reference set
Dim attributePropertiesBuilder1 As NXOpen.AttributePropertiesBuilder = Nothing
Dim workPart As Part = theSession.Parts.Work
Dim myAttributeInfo As NXObject.AttributeInformation
attributePropertiesBuilder1 = theSession.AttributeManager.CreateAttributePropertiesBuilder(theSession.Parts.Work, {theReferenceSet}, NXOpen.AttributePropertiesBuilder.OperationType.None)
Try
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle, NXObject.AttributeType.String, -1)
_attributeValue = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle1, NXObject.AttributeType.String, -1)
_attributeValue1 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle3, NXObject.AttributeType.String, -1)
_attributeValue3 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle4, NXObject.AttributeType.String, -1)
_attributeValue4 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle5, NXObject.AttributeType.String, -1)
_attributeValue5 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle6, NXObject.AttributeType.String, -1)
_attributeValue6 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle7, NXObject.AttributeType.String, -1)
_attributeValue7 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle8, NXObject.AttributeType.String, -1)
_attributeValue8 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle9, NXObject.AttributeType.String, -1)
_attributeValue9 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle10, NXObject.AttributeType.String, -1)
_attributeValue10 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle11, NXObject.AttributeType.String, -1)
_attributeValue11 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle12, NXObject.AttributeType.String, -1)
_attributeValue12 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle13, NXObject.AttributeType.String, -1)
_attributeValue13 = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle14, NXObject.AttributeType.String, -1)
_attributeValue14 = myAttributeInfo.StringValue
Catch ex As NXException
If ex.ErrorCode = 512008 Then
'attribute not found
Else
'unexpected error: show error message, undo, and exit journal
MsgBox(ex.ErrorCode & ": " & ex.Message)
'theSession.UndoToMark(markId1, undoMarkName)
Return
End If
Finally
End Try
'create new form object
Dim myForm As New Form1
'set form object properties (current part attribute title and value)
myForm.AttributeTitle = _attributeTitle
myForm.AttributeValue = _attributeValue
myForm.AttributeTitle1 = _attributeTitle1
myForm.AttributeValue1 = _attributeValue1
myForm.AttributeTitle3 = _attributeTitle3
myForm.AttributeValue3 = _attributeValue3
myForm.AttributeTitle4 = _attributeTitle4
myForm.AttributeValue4 = _attributeValue4
myForm.AttributeTitle5 = _attributeTitle5
myForm.AttributeValue5 = _attributeValue5
myForm.AttributeTitle6 = _attributeTitle6
myForm.AttributeValue6 = _attributeValue6
myForm.AttributeTitle7 = _attributeTitle7
myForm.AttributeValue7 = _attributeValue7
myForm.AttributeTitle8 = _attributeTitle8
myForm.AttributeValue8 = _attributeValue8
myForm.AttributeTitle9 = _attributeTitle9
myForm.AttributeValue9 = _attributeValue9
myForm.AttributeTitle10 = _attributeTitle10
myForm.AttributeValue10 = _attributeValue10
myForm.AttributeTitle11 = _attributeTitle11
myForm.AttributeValue11 = _attributeValue11
myForm.AttributeTitle12 = _attributeTitle12
myForm.AttributeValue12 = _attributeValue12
myForm.AttributeTitle13 = _attributeTitle13
myForm.AttributeValue13 = _attributeValue13
myForm.AttributeTitle14 = _attributeTitle14
myForm.AttributeValue14 = _attributeValue14
'display our form
myForm.ShowDialog()
If myForm.Canceled Then
'user pressed cancel, exit journal
Return
Else
'user pressed OK, assign value from form to part attribute
_attributeValue = myForm.AttributeValue
workPart.SetUserAttribute(_attributeTitle, -1, _attributeValue, Update.Option.Later)
_attributeValue1 = myForm.AttributeValue1
workPart.SetUserAttribute(_attributeTitle1, -1, _attributeValue1, Update.Option.Later)
_attributeValue3 = myForm.AttributeValue3
workPart.SetUserAttribute(_attributeTitle3, -1, _attributeValue3, Update.Option.Later)
_attributeValue4 = myForm.AttributeValue4
workPart.SetUserAttribute(_attributeTitle4, -1, _attributeValue4, Update.Option.Later)
_attributeValue5 = myForm.AttributeValue5
workPart.SetUserAttribute(_attributeTitle5, -1, _attributeValue5, Update.Option.Later)
_attributeValue6 = myForm.AttributeValue6
workPart.SetUserAttribute(_attributeTitle6, -1, _attributeValue6, Update.Option.Later)
_attributeValue7 = myForm.AttributeValue7
workPart.SetUserAttribute(_attributeTitle7, -1, _attributeValue7, Update.Option.Later)
_attributeValue8 = myForm.AttributeValue8
workPart.SetUserAttribute(_attributeTitle8, -1, _attributeValue8, Update.Option.Later)
_attributeValue9 = myForm.AttributeValue9
workPart.SetUserAttribute(_attributeTitle9, -1, _attributeValue9, Update.Option.Later)
_attributeValue10 = myForm.AttributeValue10
workPart.SetUserAttribute(_attributeTitle10, -1, _attributeValue10, Update.Option.Later)
_attributeValue11 = myForm.AttributeValue11
workPart.SetUserAttribute(_attributeTitle11, -1, _attributeValue11, Update.Option.Later)
_attributeValue12 = myForm.AttributeValue12
workPart.SetUserAttribute(_attributeTitle12, -1, _attributeValue12, Update.Option.Later)
_attributeValue13 = myForm.AttributeValue13
workPart.SetUserAttribute(_attributeTitle13, -1, _attributeValue13, Update.Option.Later)
_attributeValue14 = myForm.AttributeValue14
workPart.SetUserAttribute(_attributeTitle14, -1, _attributeValue14, Update.Option.Later)
End If
' Dim id1 As NXOpen.Session.UndoMarkId = Nothing
' id1 = theSession.GetNewestUndoMark(NXOpen.Session.MarkVisibility.Visible)
' attributePropertiesBuilder1.Commit()
' Dim nErrs1 As Integer = Nothing
' nErrs1 = theSession.UpdateManager.DoUpdate(id1)
' attributePropertiesBuilder1.Destroy()
' theSession.DeleteUndoMark(id1, Nothing)
lw.Close()
End Sub
Public Function GetUnloadOption(ByVal dummy As String) As Integer
'Unloads the image when the NX session terminates
'GetUnloadOption = NXOpen.Session.LibraryUnloadOption.AtTermination
'----Other unload options-------
'Unloads the image immediately after execution within NX
GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately
'Unloads the image explicitly, via an unload dialog
'GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Explicitly
'-------------------------------
End Function
End Module
Public Class Form1
Private _frmAttributeTitle As String
Public Property AttributeTitle() As String
Get
Return _frmAttributeTitle
End Get
Set(ByVal value As String)
_frmAttributeTitle = value
End Set
End Property
Private _frmAttributeValue As String
Public Property AttributeValue() As String
Get
Return _frmAttributeValue
End Get
Set(ByVal value As String)
_frmAttributeValue = value
End Set
End Property
''
Private _frmAttributeTitle1 As String
Public Property AttributeTitle1() As String
Get
Return _frmAttributeTitle1
End Get
Set(ByVal value As String)
_frmAttributeTitle1 = value
End Set
End Property
Private _frmAttributeValue1 As String
Public Property AttributeValue1() As String
Get
Return _frmAttributeValue1
End Get
Set(ByVal value As String)
_frmAttributeValue1 = value
End Set
End Property
''
Private _frmAttributeTitle3 As String
Public Property AttributeTitle3() As String
Get
Return _frmAttributeTitle3
End Get
Set(ByVal value As String)
_frmAttributeTitle3 = value
End Set
End Property
Private _frmAttributeValue3 As String
Public Property AttributeValue3() As String
Get
Return _frmAttributeValue3
End Get
Set(ByVal value As String)
_frmAttributeValue3 = value
End Set
End Property
Private _frmAttributeTitle4 As String
Public Property AttributeTitle4() As String
Get
Return _frmAttributeTitle4
End Get
Set(ByVal value As String)
_frmAttributeTitle4 = value
End Set
End Property
Private _frmAttributeValue4 As String
Public Property AttributeValue4() As String
Get
Return _frmAttributeValue4
End Get
Set(ByVal value As String)
_frmAttributeValue4 = value
End Set
End Property
Private _frmAttributeTitle5 As String
Public Property AttributeTitle5() As String
Get
Return _frmAttributeTitle5
End Get
Set(ByVal value As String)
_frmAttributeTitle5 = value
End Set
End Property
Private _frmAttributeValue5 As String
Public Property AttributeValue5() As String
Get
Return _frmAttributeValue5
End Get
Set(ByVal value As String)
_frmAttributeValue5 = value
End Set
End Property
Private _frmAttributeTitle6 As String
Public Property AttributeTitle6() As String
Get
Return _frmAttributeTitle6
End Get
Set(ByVal value As String)
_frmAttributeTitle6 = value
End Set
End Property
Private _frmAttributeValue6 As String
Public Property AttributeValue6() As String
Get
Return _frmAttributeValue6
End Get
Set(ByVal value As String)
_frmAttributeValue6 = value
End Set
End Property
Private _frmAttributeTitle7 As String
Public Property AttributeTitle7() As String
Get
Return _frmAttributeTitle7
End Get
Set(ByVal value As String)
_frmAttributeTitle7 = value
End Set
End Property
Private _frmAttributeValue7 As String
Public Property AttributeValue7() As String
Get
Return _frmAttributeValue7
End Get
Set(ByVal value As String)
_frmAttributeValue7 = value
End Set
End Property
Private _frmAttributeTitle8 As String
Public Property AttributeTitle8() As String
Get
Return _frmAttributeTitle8
End Get
Set(ByVal value As String)
_frmAttributeTitle8 = value
End Set
End Property
Private _frmAttributeValue8 As String
Public Property AttributeValue8() As String
Get
Return _frmAttributeValue8
End Get
Set(ByVal value As String)
_frmAttributeValue8 = value
End Set
End Property
Private _frmAttributeTitle9 As String
Public Property AttributeTitle9() As String
Get
Return _frmAttributeTitle9
End Get
Set(ByVal value As String)
_frmAttributeTitle9 = value
End Set
End Property
Private _frmAttributeValue9 As String
Public Property AttributeValue9() As String
Get
Return _frmAttributeValue9
End Get
Set(ByVal value As String)
_frmAttributeValue9 = value
End Set
End Property
Private _frmAttributeTitle10 As String
Public Property AttributeTitle10() As String
Get
Return _frmAttributeTitle10
End Get
Set(ByVal value As String)
_frmAttributeTitle10 = value
End Set
End Property
Private _frmAttributeValue10 As String
Public Property AttributeValue10() As String
Get
Return _frmAttributeValue10
End Get
Set(ByVal value As String)
_frmAttributeValue10 = value
End Set
End Property
Private _frmAttributeTitle11 As String
Public Property AttributeTitle11() As String
Get
Return _frmAttributeTitle11
End Get
Set(ByVal value As String)
_frmAttributeTitle11 = value
End Set
End Property
Private _frmAttributeValue11 As String
Public Property AttributeValue11() As String
Get
Return _frmAttributeValue11
End Get
Set(ByVal value As String)
_frmAttributeValue11 = value
End Set
End Property
Private _frmAttributeTitle12 As String
Public Property AttributeTitle12() As String
Get
Return _frmAttributeTitle12
End Get
Set(ByVal value As String)
_frmAttributeTitle12 = value
End Set
End Property
Private _frmAttributeValue12 As String
Public Property AttributeValue12() As String
Get
Return _frmAttributeValue12
End Get
Set(ByVal value As String)
_frmAttributeValue12 = value
End Set
End Property
Private _frmAttributeTitle13 As String
Public Property AttributeTitle13() As String
Get
Return _frmAttributeTitle13
End Get
Set(ByVal value As String)
_frmAttributeTitle13 = value
End Set
End Property
Private _frmAttributeValue13 As String
Public Property AttributeValue13() As String
Get
Return _frmAttributeValue13
End Get
Set(ByVal value As String)
_frmAttributeValue13 = value
End Set
End Property
Private _frmAttributeTitle14 As String
Public Property AttributeTitle14() As String
Get
Return _frmAttributeTitle14
End Get
Set(ByVal value As String)
_frmAttributeTitle14 = value
End Set
End Property
Private _frmAttributeValue14 As String
Public Property AttributeValue14() As String
Get
Return _frmAttributeValue14
End Get
Set(ByVal value As String)
_frmAttributeValue14 = value
End Set
End Property
Private _canceled As Boolean = False
Public ReadOnly Property Canceled() As Boolean
Get
Return _canceled
End Get
End Property
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label1.Text = _frmAttributeTitle
TextBox1.Text = _frmAttributeValue
End Sub
Private Sub Form2_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label2.Text = _frmAttributeTitle1
TextBox2.Text = _frmAttributeValue1
End Sub
Private Sub Form3_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label3.Text = _frmAttributeTitle3
TextBox3.Text = _frmAttributeValue3
End Sub
Private Sub Form4_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label4.Text = _frmAttributeTitle4
TextBox4.Text = _frmAttributeValue4
End Sub
Private Sub Form5_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label5.Text = _frmAttributeTitle5
TextBox5.Text = _frmAttributeValue5
End Sub
Private Sub Form6_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label6.Text = _frmAttributeTitle6
TextBox6.Text = _frmAttributeValue6
End Sub
Private Sub Form7_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label7.Text = _frmAttributeTitle7
TextBox7.Text = _frmAttributeValue7
End Sub
Private Sub Form8_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label8.Text = _frmAttributeTitle8
TextBox8.Text = _frmAttributeValue8
End Sub
Private Sub Form9_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label9.Text = _frmAttributeTitle9
TextBox9.Text = _frmAttributeValue9
End Sub
Private Sub Form10_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label10.Text = _frmAttributeTitle10
TextBox10.Text = _frmAttributeValue10
End Sub
Private Sub Form11_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label11.Text = _frmAttributeTitle11
TextBox11.Text = _frmAttributeValue11
End Sub
Private Sub Form12_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label12.Text = _frmAttributeTitle12
TextBox12.Text = _frmAttributeValue12
End Sub
Private Sub Form13_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label13.Text = _frmAttributeTitle13
TextBox13.Text = _frmAttributeValue13
End Sub
Private Sub Form14_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Label14.Text = _frmAttributeTitle14
TextBox14.Text = _frmAttributeValue14
End Sub
Private Sub btnCancel_Click(sender As System.Object, e As System.EventArgs) Handles btnCancel.Click
_canceled = True
Me.Close()
End Sub
Private Sub btnOK_Click(sender As System.Object, e As System.EventArgs) Handles btnOK.Click
_frmAttributeValue = TextBox1.Text.ToUpper
_frmAttributeValue1 = TextBox2.Text.ToUpper
_frmAttributeValue3 = TextBox3.Text.ToUpper
_frmAttributeValue4 = TextBox4.Text.ToUpper
_frmAttributeValue5 = TextBox5.Text.ToUpper
_frmAttributeValue6 = TextBox6.Text.ToUpper
_frmAttributeValue7 = TextBox7.Text.ToUpper
_frmAttributeValue8 = TextBox8.Text.ToUpper
_frmAttributeValue9 = TextBox9.Text.ToUpper
_frmAttributeValue10 = TextBox10.Text.ToUpper
_frmAttributeValue11 = TextBox11.Text.ToUpper
_frmAttributeValue12 = TextBox12.Text.ToUpper
_frmAttributeValue13 = TextBox13.Text.ToUpper
_frmAttributeValue14 = TextBox14.Text.ToUpper
Me.Close()
End Sub
End Class
_
Partial Class Form1
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
_
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
_
Private Sub InitializeComponent()
Me.btnCancel = New System.Windows.Forms.Button()
Me.btnOK = New System.Windows.Forms.Button()
Me.Label1 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.Label5 = New System.Windows.Forms.Label()
Me.Label6 = New System.Windows.Forms.Label()
Me.Label7 = New System.Windows.Forms.Label()
Me.Label8 = New System.Windows.Forms.Label()
Me.Label9 = New System.Windows.Forms.Label()
Me.Label10 = New System.Windows.Forms.Label()
Me.Label11 = New System.Windows.Forms.Label()
Me.Label12 = New System.Windows.Forms.Label()
Me.Label13 = New System.Windows.Forms.Label()
Me.Label14 = New System.Windows.Forms.Label()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.TextBox2 = New System.Windows.Forms.TextBox()
Me.TextBox3 = New System.Windows.Forms.TextBox()
Me.TextBox4 = New System.Windows.Forms.TextBox()
Me.TextBox5 = New System.Windows.Forms.TextBox()
Me.TextBox6 = New System.Windows.Forms.TextBox()
Me.TextBox7 = New System.Windows.Forms.TextBox()
Me.TextBox8 = New System.Windows.Forms.TextBox()
Me.TextBox9 = New System.Windows.Forms.TextBox()
Me.TextBox10 = New System.Windows.Forms.TextBox()
Me.TextBox11 = New System.Windows.Forms.TextBox()
Me.TextBox12 = New System.Windows.Forms.TextBox()
Me.TextBox13 = New System.Windows.Forms.TextBox()
Me.TextBox14 = New System.Windows.Forms.TextBox()
Me.SuspendLayout()
'
'btnCancel
'
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.btnCancel.Location = New System.Drawing.Point(500, 400)
Me.btnCancel.Name = "btnCancel"
Me.btnCancel.Size = New System.Drawing.Size(75, 40)
Me.btnCancel.TabIndex = 98
Me.btnCancel.Text = "Cancel"
Me.btnCancel.UseVisualStyleBackColor = True
'
'btnOK
'
Me.btnOK.Location = New System.Drawing.Point(400, 400)
Me.btnOK.Name = "btnOK"
Me.btnOK.Size = New System.Drawing.Size(75, 40)
Me.btnOK.TabIndex = 99
Me.btnOK.Text = "Ok"
Me.btnOK.UseVisualStyleBackColor = True
'
'Label1 DESCRIZIONE
'
Me.Label1.Location = New System.Drawing.Point(10, 170)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(120, 13)
Me.Label1.TabIndex = 2
Me.Label1.Text = "Label1"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label2 DESCRIZIONEAGG
'
Me.Label2.Location = New System.Drawing.Point(5, 210)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(125, 13)
Me.Label2.TabIndex = 2
Me.Label2.Text = "Label2"
Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label3 CODICEASS
'
Me.Label3.Location = New System.Drawing.Point(10, 50)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(120, 13)
Me.Label3.TabIndex = 2
Me.Label3.Text = "Label3"
Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label4 CODICEASSREV
'
Me.Label4.Location = New System.Drawing.Point(355, 50)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(120, 13)
Me.Label4.TabIndex = 2
Me.Label4.Text = "Label4"
Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label5 CODICEDWG
'
Me.Label5.Location = New System.Drawing.Point(10, 90)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(120, 13)
Me.Label5.TabIndex = 2
Me.Label5.Text = "Label5"
Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label6 CODICEDWGREV
'
Me.Label6.Location = New System.Drawing.Point(355, 90)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(120, 13)
Me.Label6.TabIndex = 2
Me.Label6.Text = "Label6"
Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label7 CODICEPAR
'
Me.Label7.Location = New System.Drawing.Point(10, 130)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(120, 13)
Me.Label7.TabIndex = 2
Me.Label7.Text = "Label7"
Me.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label8 CODICEPARREV
'
Me.Label8.Location = New System.Drawing.Point(355, 130)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(120, 13)
Me.Label8.TabIndex = 2
Me.Label8.Text = "Label8"
Me.Label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label9 COMMENTI
'
Me.Label9.Location = New System.Drawing.Point(10, 250)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(120, 13)
Me.Label9.TabIndex = 2
Me.Label9.Text = "Label9"
Me.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label10 NOTE
'
Me.Label10.Location = New System.Drawing.Point(10, 290)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(120, 13)
Me.Label10.TabIndex = 2
Me.Label10.Text = "Label10"
Me.Label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label11 TRATTAMENTO
'
Me.Label11.Location = New System.Drawing.Point(20, 330)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(120, 13)
Me.Label11.TabIndex = 22
Me.Label11.Text = "Label11"
Me.Label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label13 AUTORE
'
Me.Label12.Location = New System.Drawing.Point(20, 380)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(120, 13)
Me.Label12.TabIndex = 50
Me.Label12.Text = "Label12"
Me.Label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label13 AUTORE
'
Me.Label13.Location = New System.Drawing.Point(20, 420)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(120, 13)
Me.Label13.TabIndex = 50
Me.Label13.Text = "Label13"
Me.Label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label13 AUTORE
'
Me.Label14.Location = New System.Drawing.Point(20, 460)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(120, 13)
Me.Label14.TabIndex = 50
Me.Label14.Text = "Label14"
Me.Label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight '
'
'TextBox1 DESCRIZIONE
'
Me.TextBox1.Location = New System.Drawing.Point(150, 170)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(430, 10)
Me.TextBox1.TabIndex = 7
'
'TextBox2 DESCRIZIONEAGG
'
Me.TextBox2.Location = New System.Drawing.Point(150, 210)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(430, 10)
Me.TextBox2.TabIndex = 8
'
'TextBox3 CODICEASS - riga 50
'
Me.TextBox3.Location = New System.Drawing.Point(150, 50)
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.Size = New System.Drawing.Size(210, 10)
Me.TextBox3.TabIndex = 0
'
'TextBox4 CODICEASSREV - riga 50
'
Me.TextBox4.Location = New System.Drawing.Point(480, 50)
Me.TextBox4.Name = "TextBox4"
Me.TextBox4.Size = New System.Drawing.Size(100, 10)
Me.TextBox4.TabIndex = 1
'
'TextBox5 CODICEDWG - riga 90
'
Me.TextBox5.Location = New System.Drawing.Point(150, 90)
Me.TextBox5.Name = "TextBox5"
Me.TextBox5.Size = New System.Drawing.Size(210, 10)
Me.TextBox5.TabIndex = 2
'
'TextBox6 CODICEDWGREV - riga 90
'
Me.TextBox6.Location = New System.Drawing.Point(480, 90)
Me.TextBox6.Name = "TextBox6"
Me.TextBox6.Size = New System.Drawing.Size(100, 10)
Me.TextBox6.TabIndex = 3
'
'TextBox7 CODICEPAR - riga 130
'
Me.TextBox7.Location = New System.Drawing.Point(150, 130)
Me.TextBox7.Name = "TextBox7"
Me.TextBox7.Size = New System.Drawing.Size(210, 10)
Me.TextBox7.TabIndex = 4
'
'TextBox8 CODICEPARREV - riga 130
'
Me.TextBox8.Location = New System.Drawing.Point(480, 130)
Me.TextBox8.Name = "TextBox8"
Me.TextBox8.Size = New System.Drawing.Size(100, 10)
Me.TextBox8.TabIndex = 5
'
'TextBox9 COMMENTI - riga 130
'
Me.TextBox9.Location = New System.Drawing.Point(150, 250)
Me.TextBox9.Name = "TextBox9"
Me.TextBox9.Size = New System.Drawing.Size(430, 10)
Me.TextBox9.TabIndex = 9
'
'TextBox10 NOTE - riga 130
'
Me.TextBox10.Location = New System.Drawing.Point(150, 290)
Me.TextBox10.Name = "TextBox10"
Me.TextBox10.Size = New System.Drawing.Size(430, 10)
Me.TextBox10.TabIndex = 10
'
'TextBox11 TRATTAMENTO - riga 130
'
Me.TextBox11.Location = New System.Drawing.Point(150, 330)
Me.TextBox11.Name = "TextBox11"
Me.TextBox11.Size = New System.Drawing.Size(430, 10)
Me.TextBox11.TabIndex = 11
'
'TextBox12 AUTORE - riga 130
'
Me.TextBox12.Location = New System.Drawing.Point(150, 380)
Me.TextBox12.Name = "TextBox12"
Me.TextBox12.Size = New System.Drawing.Size(100, 10)
Me.TextBox12.TabIndex = 51
'
'TextBox13 CONTROLLATO DA - riga 130
'
Me.TextBox13.Location = New System.Drawing.Point(150, 420)
Me.TextBox13.Name = "TextBox13"
Me.TextBox13.Size = New System.Drawing.Size(100, 10)
Me.TextBox13.TabIndex = 51
'
'TextBox14 VERIFICATO DA - riga 130
'
Me.TextBox14.Location = New System.Drawing.Point(150, 460)
Me.TextBox14.Name = "TextBox14"
Me.TextBox14.Size = New System.Drawing.Size(100, 10)
Me.TextBox14.TabIndex = 51
'
'Form1
'
Me.AcceptButton = Me.btnOK
Me.AutoScaleDimensions = New System.Drawing.SizeF(5.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.CancelButton = Me.btnCancel
Me.ClientSize = New System.Drawing.Size(620, 520)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.TextBox3)
Me.Controls.Add(Me.TextBox4)
Me.Controls.Add(Me.TextBox5)
Me.Controls.Add(Me.TextBox6)
Me.Controls.Add(Me.TextBox7)
Me.Controls.Add(Me.TextBox8)
Me.Controls.Add(Me.TextBox9)
Me.Controls.Add(Me.TextBox10)
Me.Controls.Add(Me.TextBox11)
Me.Controls.Add(Me.TextBox12)
Me.Controls.Add(Me.TextBox13)
Me.Controls.Add(Me.TextBox14)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.Label7)
Me.Controls.Add(Me.Label8)
Me.Controls.Add(Me.Label9)
Me.Controls.Add(Me.Label10)
Me.Controls.Add(Me.Label11)
Me.Controls.Add(Me.Label12)
Me.Controls.Add(Me.Label13)
Me.Controls.Add(Me.Label14)
Me.Controls.Add(Me.btnOK)
Me.Controls.Add(Me.btnCancel)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "Form177"
Me.Text = "COMPILAZIONE CARTIGLIO - GFM - "
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents btnCancel As System.Windows.Forms.Button
Friend WithEvents btnOK As System.Windows.Forms.Button
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents TextBox5 As System.Windows.Forms.TextBox
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents TextBox6 As System.Windows.Forms.TextBox
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents TextBox7 As System.Windows.Forms.TextBox
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents TextBox8 As System.Windows.Forms.TextBox
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents TextBox9 As System.Windows.Forms.TextBox
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents TextBox10 As System.Windows.Forms.TextBox
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents TextBox11 As System.Windows.Forms.TextBox
Friend WithEvents Label12 As System.Windows.Forms.Label
Friend WithEvents TextBox12 As System.Windows.Forms.TextBox
Friend WithEvents Label13 As System.Windows.Forms.Label
Friend WithEvents TextBox13 As System.Windows.Forms.TextBox
Friend WithEvents Label14 As System.Windows.Forms.Label
Friend WithEvents TextBox14 As System.Windows.Forms.TextBox
End Class
re: dataset in form
"is it possible to use the data set in my FORM?"
Can you provide more information? It isn't clear to me what you are trying to do here. Do you want to make use of the .net DataSet class for something?
https://learn.microsoft.com/en-us/dotnet/api/system.data.dataset?view=ne...
I tested two solution, but I
I tested two solution, but I have another question about this problem.
I would select the reference set inside de file with the mouse before launch the VB File.
The VB file it must be able to read the attribute inside the reference set and if there wasn't any reference set selected it must be able to red the attributes of the file.
You have any idea to solve this problem.
Thanks al lot in advanse for your help.
re: preselect reference set
I ran a quick test: I created a new reference set, turned off "timestamp order" in the part navigator (so that the ref sets would show up in the list), I then selected the ref set and ran my code. Unfortunately, it doesn't recognize the ref set as being selected.
How are you selecting the ref set? Is there another way that I should try?