Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all, This is really strange and I can't quite figure it out.
I have a dictionary in the NOD with several xrecords. I want to change an entry value in one but the others in the dictionary also get changed. How would they be connected?
This is some simlified code that looks at two xrecords, changes one, then reports the new values. Wierd thing is that both xrecords get changed.
For i = 1 To 2
XRecId = MyAppDict.GetAt(i)
XRec = trans.GetObject(XRecId, OpenMode.ForRead)
ed.WriteMessage(vbLf + "XRecord: " & i & " First Entry: " & XRec.Data(0).value)
Next
XRecId = MyAppDict.GetAt(2)
XRec = trans.GetObject(XRecId, OpenMode.ForWrite)
Dim data As ResultBuffer = New ResultBuffer(New TypedValue(DxfCode.Int16, 2), New TypedValue(DxfCode.Text, XRec.Data(1).value))
XRec.Data = data
For i = 1 To 2
XRecId = MyAppDict.GetAt(i)
XRec = trans.GetObject(XRecId, OpenMode.ForRead)
ed.WriteMessage(vbLf + "XRecord: " & i & " First Entry: " & XRec.Data(0).value)
Next
Solved! Go to Solution.