Hi Ronan!
There is of course the Run Program command but the problem you quite rightly face is how to suppress the dialog and yet pass the appropriate values to the scalebar program. You would also need to determine somehow the coordinates for the insertion of the scalebar.
May I suggest quite another approach, that you simply dissect the source code for scalebar and use the appropriate bits as a subroutine in your own mbx. You have MapBasic, so look in the samples folder.
Then you would have no problems passing whatever values needed, and you might even think of hard coding some of them. In fact, the only variable you really need would be the insertion point, which could be computed as a point relative to the mapper centre point or something.
Trying to run am mbx from another when the source is available seem as an unnecessary workaround.
Hälsning / Best regards Mats.E
________________________
FB Engineering AB
Södra Förstadsgatan 26
211 43 Malmö
Tel: 040-660 25 50
Mobil: 0705-27 60 27
Fax: 040-660 25 99
[EMAIL PROTECTED]
www.fbe.se
[EMAIL PROTECTED] wrote: -----
To: <[email protected]>
From: "Ronan Moriarty" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
Date: 11/17/2005 05:19PM
Subject: [MI-L] Passing command line parameters to mbx's.
Hi All,
I’m writing an mbx for MapInfo 6.5 to save a large number of maps as image files. I want to add scalebars to each map, so I intend to run ScaleBar.mbx (Version 3.5) from my own mbx. Once the scale bar is added to the Mapper window, I intend to move the scale bar objects for each image being saved, so that they appear on each map image created (the scale of all the images are going to be the same!). I feel that automating the addition of the scalebar would be the ideal approach, as I need to standardise the maps as much as possible, so the less user-interaction the better.
What I would like to know is if there is any way of passing “command line parameters” to Scalebar.mbx from my mbx, so that the dialog doesn’t have to be displayed and the scale bar properties can be set and the scale bar can be added automatically. Alternatively, maybe I could use DDE to achieve a similar result? At a glance, it would appear that I could edit the Scalebar.prf file to change the scale bar settings, but without documentation, it could involve a large amount of trial and error!
Also, if either of these approaches are possible, I need to find documentation on the command line parameters / DDE requests to use! Again, the program is ScaleBar.mbx and it’s version 3.5.
Thanks in advance,
Ronan Moriarty.
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l
_______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l
