.NET C# developer here. Trying to figure out MapBasic with the IDE for the first time. It's shall we say...a different experience to C# in Visual studio.
I have a
ButtonPad with a button that calls a stored proc in the SQL server db which performs an insert on one selected polygon in my BidBlock layer:
' User Hit Bid Block print cmd_INFO_MENUITEM if getSelectionInfo(SelCount, SelTableName) then if SelCount = 1 then 'Have one Contract selected if selTableName = vwBidBlocks then i_blockId = selection.block_id if i_blockId = 0 then run menu command 304 note "Please re-select your Bid Block." ' set handler WinChangedHandler on exit sub end if 'call notyet() call BidBlock(i_blockID) else dialog error handling blah blah
I'm now trying to implement this function to perform on a selection of > 1 polygons in the layer. I want to therefore make an dynamic array of items using
& itterate over the ID's of each selected item in the array calling my
BidBlock(i_blockId) function. In C# I would use a
for each loop here which implements the
IEnumberable interface. Is there any way of doing this in MapBasic?