try inserting the x and y values as a list into a dictionary keyed to the FID.
Then you can access them by key, and you can order the keys any way you want.
One can never tell what order the records in a database actually have;
any tool to look the contents of a database table actually shows you a view,
which is usually ordered on the index field.
The records themselves can be in any order, and they may not be in the same order at some other point in time.
srows = arcpy.SearchCursor(add) dictionary =dict([(r.OID,[r.POINT_X,r.POINT_Y]) for r in srows]) for key,value in dictionary.iteritems(): display = str(key) + " : " + str(value) print display
Can anyone tell me how to get Data Matrix in VB.NET? I want to create some Data Matrix barcodes in VB.NET. I googled and found tools like this. Must I use such a tool? And how can I choose a good one in the Internet? By this way, I read this guide of creating barcode in VB.NET and copied the sample code in my program. But it can not work. Why is this? Here is the sample code:
Imports OnBarcode.Barcode
Dim barcode As DataMatrix = New DataMatrix
' Data Matrix Barcode Basic Settings
barcode.Data = "112233445566"
barcode.DataMode = DataMatrixDataMode.ASCII
'if your selected format mode doesnot have enough space to encode your data,
'the library will choose the right format mode for you automatically.
barcode.FormatMode = DataMatrixFormatMode.Format_48X48
'Set the ProcessTilde property to true, if you want use the tilde character "~"
'to specify special characters in the input data. Default is false.
'1) 1-byte character: ~0dd/~1dd/~2dd (character value from 000 ~ 255);
' ASCII character '~' is presented by ~126;
' Strings from "~256" to "~299" are unused
' modified to FS, GS, RS and US respectively.
'2) 2-byte character (Unicode): ~6ddddd (character value from 00000 ~ 65535)
' Strings from "~665536" to "~699999" are unused
'3) for GS1 AI Code:
' ~ai2: AI with 2 digits
' ~ai3: AI with 3 digits
' ~ai4: AI with 4 digits
' ~ai5: AI with 5 digits
' ~ai6: AI with 6 digits
' ~ai7: AI with 7 digits
'4) ECI: ~7dddddd (valid value of dddddd from 000000 to 999999)
'5) ~rp: Reader Programming (for ASCII mode and Auto mode only)
'6) ~m5: 05 Macro (for ASCII mode and Auto mode only)
'7) ~m6: 06 Macro (for ASCII mode and Auto mode only)
barcode.ProcessTilde = True
' Barcode Size Related Settings
barcode.UOM = UnitOfMeasure.PIXEL
barcode.X = 3
barcode.LeftMargin = 0
barcode.RightMargin = 0
barcode.TopMargin = 0
barcode.BottomMargin = 0
barcode.Resolution = 96
barcode.Rotate = Rotate.Rotate0
' Image format setting
barcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Gif()
barcode.drawBarcode("c://data-matrix.gif")
as for data matrix i just generated it using .net program ,not knowing whether helps?