Hello,
Can we run Map Basic code in Designer? May be using Run Command tool? Please advise.
Thanks!
Solved! Go to Solution.
Hi @timewaste
I'm not familiar with MapBasic, but it looks like you can execute code from the command line: https://groups.google.com/forum/#!topic/mapinfo-l/4m7cIUFJVOo
You could create a batch file that you could kick off using the run command tool which executes the MapBasic code.
@BrandonB Let me give it a shot. Thanks a ton!
@BrandonB So, here's what we replicated and followed. Please advise.
You can compile and the run your program like so:
C:\"Program Files"\MapInfo\MapBasic\mapbasic.exe -NOSPLASH -D
"myprog.MB"
myprog.mbx
Did you put the -NOSPLASH -D after the MapInfoPro.exe in the run external program command or did you place them in the Command arguments? These should be placed in the command arguments section. Otherwise if they are in the Run External Program Command your machine treats them as part of the file path name.
Also, it is probably best to leave the write source and read results empty until you have the program executing properly.
Here is the help documentation on the run tool: https://help.alteryx.com/2019.1/RunCommand.htm
One other option is to make a batch file on your desktop or other file location and reference it from the Run Command tool.
Step 1.) Create new text file on desktop
Step 2.) Configure script to run your program and use any other parameters desired
Step 3.) Change file extension from .txt to .bat
Step 4.) Point your Run Command tool at this file.
Either way should work