0

I need to run a hotlink process on a dataset but I keep getting a "Could not convert data"

Map From DSC_DCDB
Browse * from DSC_DCDB
Set Map Window DSC_DCDB  Layer 1 Activate Using PATH_Survey+HOTLINK_Survey On Labels Objects Relative Path Off Enable On ,Using PATH_JUMPUP+HOTLINK_JUMPUP On Labels Objects Relative Path Off Enable On ,Using PATH_ASCON+Hotlink_ASCON On Labels Objects Relative Path Off Enable On

What should I do? I want to run this as part of a larger mapbasic process.

  • Have you tried putting a space between the column names? e.g. PATH_Survey + HOTLINK_Survey – T_Bacon Aug 24 '16 at 8:31
  • Also, are your column names stored as variables? If so, what data type (e.g. string, alias, etc...)? – T_Bacon Aug 24 '16 at 8:35
  • @T_Bacon thanks -I tried putting a space but it doesn't work. The column names are all 100 character text strings. If I run the hotlink in MI Pro I get the following code "Set Map Window 433993008 Layer 1 Editable On Set Map Window 433993008 Layer 1 Activate Using PATH_Survey+HOTLINK_Survey On Labels Objects Relative Path On Enable On" the issues seem to be with assigning the window name as the rest of the code works when it's placed after "Set Map Window 433993008 Layer 1". – GeorgeC Aug 24 '16 at 8:44
2

Ah, based on your comment above I've noticed you're not using the correct window identifier. Basically, each window in MapInfo has a window ID and you need to get this for the Mapper window that you've just opened. The easiest way to do that is to use the FrontWindow() function immediately after you've opened the map window (as the map window will be guaranteed to be the front window). Your code should then look like this:

Dim mapWinID as Integer

Map From DSC_DCDB
mapWinID = FrontWindow()    '// get the map window ID here and use it to specify the window in the Set Map statement below
Browse * from DSC_DCDB
Set Map Window mapWinID Layer 1 Activate Using PATH_Survey+HOTLINK_Survey On Labels Objects Relative Path Off Enable On,
                                          Using PATH_JUMPUP+HOTLINK_JUMPUP On Labels Objects Relative Path Off Enable On,
                                          Using PATH_ASCON+Hotlink_ASCON On Labels Objects Relative Path Off Enable On

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.