MapInfo Pro

 View Only

MapBasic - batch abbreviating of road names

  • 1.  MapBasic - batch abbreviating of road names

    Posted an hour ago

    Can MapBasic (for MapInfo 23.2) do batch abbreviating of road names, please?

    By this I mean in three tables I have (Pipes, Pits and Prop), there is in each a road name field called "St_Name", and the road names are in full, eg. Main Street, Jones Road, Smith Crescent (and so on).

    What I'm looking for is something like the 'Search and Replace' tool 'on steroids', ie. it is able to change 'Road' to 'Rd', 'Street' to 'St', 'Crescent' to 'Cr' (and so on for other road types) without affecting the 'Main', 'Jones', 'Smith', etc.
    Ideally, it can do all 3 tables at once to speed things up (but will be happy doing one table at a time if need be).
    There are a couple of caveats for this, in that a small proportion of the features in these tables have a blank entry in the "St_Name" field, or otherwise something like "Lot B"; so such a MapBasic app needs to be able to work around this. Most features will have road names such as above.

    With the help of ChatGPT earlier today on my work PC (which is where it will be used) I was able to create an app in MapBasic that compiled OK, but still came up with an error when running in MapInfo.

    Thanks, John



    ------------------------------
    John Cleverdon
    Director
    John Cleverdon
    DROMANA VIC
    ------------------------------