from Spotfire.Dxp.Data import DataValueCursor myLatCursor = DataValueCursor.CreateFormatted(Document.Data.Tables["mydatatable"].Columns["latitude"]) myLongCursor = DataValueCursor.CreateFormatted(Document.Data.Tables["mydatatable"].Columns["longitude"]) markedRows = Document.Data.Markings["Marking"].GetSelection(Document.Data.Tables["mydatatable"]).AsIndexSet() for row in Document.Data.Tables["mydatatable"].GetRows(markedRows, myLatCursor): Document.Properties['refLat'] = myLatCursor.CurrentValue for row in Document.Data.Tables["mydatatable"].GetRows(markedRows, myLongCursor): Document.Properties['refLong'] = myLongCursor.CurrentValue
This script can be used to set 1 or more document properties from a marked record. If more than one are marked, it uses the last one in the stack. The example above sets the "refLat" and "refLong" properties from the "mydatatable" datatable, which has Latitude and Longitude columns. This script was used in the "Visualizing the radius around a point on a map" article as seen on the Tips & Tricks blog.
I like this post because it is informative and helpful to all readers. I would like to revisit this post. Welcome to the njpropertyrecords! NJ Tax Maps information you about NJ Tax Maps and map searches.
ReplyDeleteI used this script to set document properties from a marked record. However after script executes the record is unmarked. How can I keep the record marked?
ReplyDeleteThanks so much!!
Steve
Watch Packers Game Live
ReplyDeleteTexans Game Live Streaming
Falcons NFL Game Live
I really appreciate your professional approach.These are pieces of very useful information that will be of great use for me in future.
ReplyDeleteមាន់ជល់អនឡាញ