WinForms

Hello

I have created winforms as code available in this site
http://www.nxjournaling.com/content/using-winforms-journals

I have created winform for project, Drawn, checked, date etc for Title Block update
and in title block created note as * and assigned attribute like
<WRef1*0@PROJECT>
<WRef2*0@DRAWN>
<WRef3*0@CHECKED>
<WRef4*0@DATE>
etc

It is working fine for some attributes and for some I need to manually change like WRef7 to WRef3, then it will update, can you please help me to solve above issue

Thank you In advance

Are you using the AssociativeText class to generate the reference text? Can you post the relevant code?

Thank you for your quick reply

I am not using any associative Text class, in Drafting file created note and given attribute as WRef2*0@DRAWN, WRef2*0@LOCATION etc

Below is my code

Option Strict Off
Imports System
Imports NXOpen

Module Module1

Private Const _attributeTitle1 As String = "CAD_FORMAT"
Public ReadOnly Property attributeTitle1() As String
Get
Return _attributeTitle1
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 _attributeTitle2 As String = "SIMILAR_PART"
Public ReadOnly Property attributeTitle2() As String
Get
Return _attributeTitle2
End Get
End Property

Private _attributeValue2 As String = ""
Public Property attributeValue2() As String
Get
Return _attributeValue2
End Get
Set(ByVal value2 As String)
_attributeValue2 = value2
End Set
End Property

Private Const _attributeTitle3 As String = "LOCATION"
Public ReadOnly Property attributeTitle3() As String
Get
Return _attributeTitle3
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 = "DATE"
Public ReadOnly Property attributeTitle4() As String
Get
Return _attributeTitle4
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 = "DRAWN"
Public ReadOnly Property attributeTitle5() As String
Get
Return _attributeTitle5
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 = "CHECKED"
Public ReadOnly Property attributeTitle6() As String
Get
Return _attributeTitle6
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

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 myAttributeInfo1 As NXObject.AttributeInformation
Dim myAttributeInfo2 As NXObject.AttributeInformation
Dim myAttributeInfo3 As NXObject.AttributeInformation
Dim myAttributeInfo4 As NXObject.AttributeInformation
Dim myAttributeInfo5 As NXObject.AttributeInformation
Dim myAttributeInfo6 As NXObject.AttributeInformation
Try
myAttributeInfo1 = workPart.GetUserAttribute(_attributeTitle1, NXObject.AttributeType.String, -1)
_attributeValue1 = myAttributeInfo1.StringValue

myAttributeInfo2 = workPart.GetUserAttribute(_attributeTitle2, NXObject.AttributeType.String, -1)
_attributeValue2 = myAttributeInfo2.StringValue

myAttributeInfo3 = workPart.GetUserAttribute(_attributeTitle3, NXObject.AttributeType.String, -1)
_attributeValue3 = myAttributeInfo3.StringValue

myAttributeInfo4 = workPart.GetUserAttribute(_attributeTitle4, NXObject.AttributeType.String, -1)
_attributeValue4 = myAttributeInfo4.StringValue

myAttributeInfo5 = workPart.GetUserAttribute(_attributeTitle5, NXObject.AttributeType.String, -1)
_attributeValue5 = myAttributeInfo5.StringValue

myAttributeInfo6 = workPart.GetUserAttribute(_attributeTitle6, NXObject.AttributeType.String, -1)
_attributeValue6 = myAttributeInfo6.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.attributeTitle1 = _attributeTitle1
myForm.AttributeValue1 = _attributeValue1

myForm.attributeTitle2 = _attributeTitle2
myForm.attributeValue2 = _attributeValue2

myForm.attributeTitle3 = _attributeTitle3
myForm.attributeValue3 = _attributeValue3

myForm.attributeTitle4 = _attributeTitle4
myForm.attributeValue4 = _attributeValue4

myForm.attributeTitle5 = _attributeTitle5
myForm.attributeValue5 = _attributeValue5

myForm.attributeTitle6 = _attributeTitle6
myForm.attributeValue6 = _attributeValue6

'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
_attributeValue1 = myForm.AttributeValue1
workPart.SetUserAttribute(_attributeTitle1, -1, _attributeValue1, Update.Option.Later)

_attributeValue2 = myForm.attributeValue2
workPart.SetUserAttribute(_attributeTitle2, -1, _attributeValue2, 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)

End If

lw.Close()

Dim objects1(0) As NXOpen.NXObject
objects1(0) = workPart
Dim attributePropertiesBuilder1 As NXOpen.AttributePropertiesBuilder = Nothing
attributePropertiesBuilder1 = theSession.AttributeManager.CreateAttributePropertiesBuilder(workPart, objects1, NXOpen.AttributePropertiesBuilder.OperationType.None)

attributePropertiesBuilder1.IsArray = False

attributePropertiesBuilder1.IsArray = False

attributePropertiesBuilder1.IsArray = False

attributePropertiesBuilder1.DataType = NXOpen.AttributePropertiesBaseBuilder.DataTypeOptions.String

attributePropertiesBuilder1.Units = "MilliMeter"

Dim objects2(0) As NXOpen.NXObject
objects2(0) = workPart
Dim massPropertiesBuilder1 As NXOpen.MassPropertiesBuilder = Nothing
massPropertiesBuilder1 = workPart.PropertiesManager.CreateMassPropertiesBuilder(objects2)

Dim selectNXObjectList1 As NXOpen.SelectNXObjectList = Nothing
selectNXObjectList1 = massPropertiesBuilder1.SelectedObjects

Dim objects3() As NXOpen.NXObject
objects3 = selectNXObjectList1.GetArray()

massPropertiesBuilder1.LoadPartialComponents = True

massPropertiesBuilder1.Accuracy = 0.999

Dim objects4(0) As NXOpen.NXObject
objects4(0) = workPart
Dim previewPropertiesBuilder1 As NXOpen.PreviewPropertiesBuilder = Nothing
previewPropertiesBuilder1 = workPart.PropertiesManager.CreatePreviewPropertiesBuilder(objects4)

previewPropertiesBuilder1.StorePartPreview = True

previewPropertiesBuilder1.StoreModelViewPreview = True

previewPropertiesBuilder1.ModelViewCreation = NXOpen.PreviewPropertiesBuilder.ModelViewCreationOptions.OnViewSave

Dim objects5(0) As NXOpen.NXObject
objects5(0) = workPart
attributePropertiesBuilder1.SetAttributeObjects(objects5)

attributePropertiesBuilder1.Units = "MilliMeter"

theSession.SetUndoMarkName(markId1, "Displayed Part Properties Dialog")

attributePropertiesBuilder1.DateValue.DateItem.Day = NXOpen.DateItemBuilder.DayOfMonth.Day23

attributePropertiesBuilder1.DateValue.DateItem.Month = NXOpen.DateItemBuilder.MonthOfYear.Jul

attributePropertiesBuilder1.DateValue.DateItem.Year = "2020"

attributePropertiesBuilder1.DateValue.DateItem.Time = "00:00:00"

massPropertiesBuilder1.UpdateOnSave = NXOpen.MassPropertiesBuilder.UpdateOptions.Yes

Dim markId2 As NXOpen.Session.UndoMarkId = Nothing
markId2 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Displayed Part Properties")

theSession.DeleteUndoMark(markId2, Nothing)

Dim markId3 As NXOpen.Session.UndoMarkId = Nothing
markId3 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Displayed Part Properties")

Dim nXObject1 As NXOpen.NXObject = Nothing
nXObject1 = attributePropertiesBuilder1.Commit()

Dim updateoption1 As NXOpen.MassPropertiesBuilder.UpdateOptions = Nothing
updateoption1 = massPropertiesBuilder1.UpdateOnSave

Dim nXObject2 As NXOpen.NXObject = Nothing
nXObject2 = massPropertiesBuilder1.Commit()

workPart.PartPreviewMode = NXOpen.BasePart.PartPreview.OnSave

Dim nXObject3 As NXOpen.NXObject = Nothing
nXObject3 = previewPropertiesBuilder1.Commit()

Dim id1 As NXOpen.Session.UndoMarkId = Nothing
id1 = theSession.GetNewestUndoMark(NXOpen.Session.MarkVisibility.Visible)

Dim nErrs1 As Integer = Nothing
nErrs1 = theSession.UpdateManager.DoUpdate(id1)

theSession.DeleteUndoMark(markId3, Nothing)

theSession.SetUndoMarkName(id1, "Displayed Part Properties")

attributePropertiesBuilder1.Destroy()

massPropertiesBuilder1.Destroy()

previewPropertiesBuilder1.Destroy()

theSession.CleanUpFacetedFacesAndEdges()

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 _frmattributeTitle1 As String
Public Property attributeTitle1() As String
Get
Return _frmattributeTitle1
End Get
Set(ByVal value1 As String)
_frmattributeTitle1 = value1
End Set
End Property

Private _frmAttributeValue1 As String
Public Property AttributeValue1() As String
Get
Return _frmAttributeValue1
End Get
Set(ByVal value1 As String)
_frmAttributeValue1 = value1
End Set
End Property

Private _frmattributeTitle2 As String
Public Property attributeTitle2() As String
Get
Return _frmattributeTitle2
End Get
Set(ByVal value2 As String)
_frmattributeTitle2 = value2
End Set
End Property

Private _frmattributeValue2 As String
Public Property attributeValue2() As String
Get
Return _frmattributeValue2
End Get
Set(ByVal value2 As String)
_frmattributeValue2 = value2
End Set
End Property

Private _frmattributeTitle3 As String
Public Property attributeTitle3() As String
Get
Return _frmattributeTitle3
End Get
Set(ByVal value3 As String)
_frmattributeTitle3 = value3
End Set
End Property

Private _frmattributeValue3 As String
Public Property attributeValue3() As String
Get
Return _frmattributeValue3
End Get
Set(ByVal value3 As String)
_frmattributeValue3 = value3
End Set
End Property

Private _frmattributeTitle4 As String
Public Property attributeTitle4() As String
Get
Return _frmattributeTitle4
End Get
Set(ByVal value4 As String)
_frmattributeTitle4 = value4
End Set
End Property

Private _frmattributeValue4 As String
Public Property attributeValue4() As String
Get
Return _frmattributeValue4
End Get
Set(ByVal value4 As String)
_frmattributeValue4 = value4
End Set
End Property

Private _frmattributeTitle5 As String
Public Property attributeTitle5() As String
Get
Return _frmattributeTitle5
End Get
Set(ByVal value5 As String)
_frmattributeTitle5 = value5
End Set
End Property

Private _frmattributeValue5 As String
Public Property attributeValue5() As String
Get
Return _frmattributeValue5
End Get
Set(ByVal value5 As String)
_frmattributeValue5 = value5
End Set
End Property

Private _frmattributeTitle6 As String
Public Property attributeTitle6() As String
Get
Return _frmattributeTitle6
End Get
Set(ByVal value6 As String)
_frmattributeTitle6 = value6
End Set
End Property

Private _frmattributeValue6 As String
Public Property attributeValue6() As String
Get
Return _frmattributeValue6
End Get
Set(ByVal value6 As String)
_frmattributeValue6 = value6
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
Label01.Text = "TITLE BLOCK ATTRIBUTES"

Label1.Text = _frmAttributeTitle1
'TextBox1.Text = _frmAttributeValue1
TextBox1.Text = "NX11"

Label2.Text = _frmattributeTitle2
'TextBox2.Text = _frmattributeValue2
TextBox2.Text = ""

Label3.Text = _frmattributeTitle3
'TextBox3.Text = _frmattributeValue3
TextBox3.Text = ""

Label4.Text = _frmattributeTitle4
'TextBox4.Text = _frmattributeValue4
TextBox4.Text = ""

Label5.Text = _frmattributeTitle5
ComboBox5.Text = ""

Label6.Text = _frmattributeTitle6
ComboBox6.Text = ""

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

_frmAttributeValue1 = TextBox1.Text.ToUpper
_frmattributeValue2 = TextBox2.Text.ToUpper
_frmattributeValue3 = TextBox3.Text.ToUpper
_frmattributeValue4 = TextBox4.Text.ToUpper
_frmAttributeValue5 = ComboBox5.Text.ToUpper
_frmAttributeValue6 = ComboBox6.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.Label01 = New System.Windows.Forms.Label()

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.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.ComboBox5 = New System.Windows.Forms.ComboBox()
Me.ComboBox6 = New System.Windows.Forms.ComboBox()

Me.SuspendLayout()
'
'btnCancel
'
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.btnCancel.Location = New System.Drawing.Point(400, 450)
Me.btnCancel.Name = "btnCancel"
Me.btnCancel.Size = New System.Drawing.Size(50, 30)
Me.btnCancel.TabIndex = 0
Me.btnCancel.Text = "Cancel"
Me.btnCancel.UseVisualStyleBackColor = True
'
'btnOK
'
Me.btnOK.Location = New System.Drawing.Point(300, 450)
Me.btnOK.Name = "btnOK"
Me.btnOK.Size = New System.Drawing.Size(50, 30)
Me.btnOK.TabIndex = 1
Me.btnOK.Text = "Ok"
Me.btnOK.UseVisualStyleBackColor = True
'

'Label01
'
Me.Label01.Location = New System.Drawing.Point(80, 5)
Me.Label01.Name = "Label01"
Me.Label01.Size = New System.Drawing.Size(150, 13)
Me.Label01.TabIndex = 2
Me.Label01.Text = "Label01"
Me.Label01.TextAlign = System.Drawing.ContentAlignment.MiddleRight

'Label1
'
Me.Label1.Location = New System.Drawing.Point(12, 25)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(85, 13)
Me.Label1.TabIndex = 4
Me.Label1.Text = "Label1"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(5, 55)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(90, 13)
Me.Label2.TabIndex = 5
Me.Label2.Text = "Label2"
Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight

'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(-10, 85)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(90, 13)
Me.Label3.TabIndex = 6
Me.Label3.Text = "Label3"
Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight

'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(-40, 115)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(90, 13)
Me.Label4.TabIndex = 7
Me.Label4.Text = "Label4"
Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight

'Label5
'
Me.Label5.Location = New System.Drawing.Point(-30, 145)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(90, 13)
Me.Label5.TabIndex = 8
Me.Label5.Text = "Label5"
Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight

'Label6
'
Me.Label6.Location = New System.Drawing.Point(-20, 175)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(90, 13)
Me.Label6.TabIndex = 9
Me.Label6.Text = "Label6"
Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight

'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(130, 25)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(156, 20)
Me.TextBox1.TabIndex =24

'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(130, 55)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(156, 20)
Me.TextBox2.TabIndex = 25

'TextBox3
'
Me.TextBox3.Location = New System.Drawing.Point(130, 85)
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.Size = New System.Drawing.Size(156, 20)
Me.TextBox3.TabIndex = 26

'TextBox4
'
Me.TextBox4.Location = New System.Drawing.Point(130, 115)
Me.TextBox4.Name = "TextBox4"
Me.TextBox4.Size = New System.Drawing.Size(156, 20)
Me.TextBox4.TabIndex = 27

Me.ComboBox5.FormattingEnabled = True
Me.ComboBox5.Items.AddRange(New Object() {"A", "B", "C", "D"})
Me.ComboBox5.Location = New System.Drawing.Point(130, 145)
Me.ComboBox5.Name = "ComboBox5"
Me.ComboBox5.Size = New System.Drawing.Size(156, 21)
Me.ComboBox5.TabIndex = 28

Me.ComboBox6.FormattingEnabled = True
Me.ComboBox6.Items.AddRange(New Object() {"A"})
Me.ComboBox6.Location = New System.Drawing.Point(130, 175)
Me.ComboBox6.Name = "ComboBox6"
Me.ComboBox6.Size = New System.Drawing.Size(156, 21)
Me.ComboBox6.TabIndex = 29

'
'Form1
'
Me.AcceptButton = Me.btnOK
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.CancelButton = Me.btnCancel
Me.ClientSize = New System.Drawing.Size(700, 500)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.TextBox3)
Me.Controls.Add(Me.TextBox4)
Me.Controls.Add(Me.ComboBox5)
Me.Controls.Add(Me.ComboBox6)

Me.Controls.Add(Me.Label01)
Me.Controls.Add(Me.Label02)
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.btnOK)
Me.Controls.Add(Me.btnCancel)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "Form1"
Me.Text = "Tittle Block & Revision Block Information"
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 Label01 As System.Windows.Forms.Label
Friend WithEvents Label02 As System.Windows.Forms.Label
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label

Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
Friend WithEvents ComboBox5 As System.Windows.Forms.ComboBox
Friend WithEvents ComboBox6 As System.Windows.Forms.ComboBox

End Class

Hi,

can you please help me in resolving above issue, is there any attribute like "" which can be given to text in drawing file and will update once above journal executed

Thanks In advance

It appears that these are all drawing attributes. If so, you should be able to create the attributes and the notes that reference them in your drawing template. If the attributes exist before the note is created, it should maintain associativity between the two. If/when the attribute value changes, the note should update. This should work whether you change the attribute values manually or through a journal.

If you update the attribute manually, does your note update? If not, then the note was probably created incorrectly. Use the "relationships" section of the note dialog to create the note connected to the attribute. If you type in the "Wref..." stuff yourself, there is a good chance it won't work.

attribute like

"W!" & myComponent.Tag.ToString & "@" & myAttrTitle & ""

I added the required attributes in template file, it worked thank you so much for your help