MapInfo Pro

 View Only
  • 1.  $CurWorkspace not working giving error 301

    Posted 05-24-2023 15:06

    Opening a workspace from a local drive, have tried using regular launch and running as administrator.  I have 5 users and all work but this one.  Same member of the group in AD, same policies and settings.  However in MI 2021 the user can't use the $CurWorkspace smartext, gives error 301 the key is not present.   Other smarttext work fine.  Suggestions?  

    James McGee
    Nwap II Inc
    Bellevue WA

  • 2.  RE: $CurWorkspace not working giving error 301

    Posted 05-25-2023 04:39

    Hi James

    The error 301 means that the alias key specified in the SmartText isn't found in the SmartTextAlias files.

    I assume your SmartText looks like this, right: Workspace: ${CurWorkspace}
    This would mean that the key CurWorkspace can't be found in this specific user's alias file.

    Next step: On the Layout tab, does your Text dropdown look like this:

    This should give you a full list of all the SmartText aliases in the SmartTextAlias file. If it's empty or holds fewer values, the problem relates to this file.

    Final step: Check the SmartTextAlias file.
    First, we need to locate where MapInfo Pro tries to find the file. Open the MapBasic window from the Tools window dropdown on the Home tab.
    Write this statement and hit the Enter key:
    Print "SmartTextAlias file: " + LocateFile$(1)

    In the Message window, you should now see a file path to the file.
    It's typically in the User's AppData folder or in the WorkGroup folder.

    Check if this file exists, if not copy it from another computer.
    If it exists, check the content and if some keys are missing, you can again copy the file from another computer.

    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data

  • 3.  RE: $CurWorkspace not working giving error 301

    Posted 05-25-2023 13:48

    Yep, spot on, after doing a repair of mapinfo didnt think about the fact it would overwrite the smarttext.xml file, fixed it and it's working now, thansk for the reply. 

    James McGee
    Nwap II Inc
    Bellevue WA