Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Run Map Basic code in designer (Run command tool?)

timewaste
8 - Asteroid

Hello,

 

Can we run Map Basic code in Designer? May be using Run Command tool? Please advise.

 

Thanks!

5 REPLIES 5
BrandonB
Alteryx
Alteryx

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. 

timewaste
8 - Asteroid

@BrandonB Let me give it a shot. Thanks a ton!

timewaste
8 - Asteroid

@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 

 

Alteryx Use Case.png

BrandonB
Alteryx
Alteryx

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 

BrandonB
Alteryx
Alteryx

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

Labels