Hi, Thanks for while! Now, if I run the macro on Delphi XE2 using the following code:
RemoteMapObject.RunUIMacro('G30 new layer default settings', 'gis_ui', layerName); I don't get the error anymore. But the error just don't appear if Maptitude.exe is open in another window. If I try to run the code on Delphi before open Maptitude.exe I get the following error message: "Array not initialized. Click OK to continue. Reference info: map, 940, 8." By the way, I noticed that the error just occurs if I run a macro which has another macro inside. For example, when I run this macro I don't get any error. Macro "teste" return ( "TRUE" ) endMacro But, if I run this other, GISDK returns the error. Macro "teste" flag = RunMacro("G30 set exist", "gis_ui", "teste") return flag endMacro Can you help me? --- In Maptitude@yahoogroups.com, maptitude-ow...@yahoogroups.com wrote: > > Just to clarify: You must replace RunMacro() with RunUIMacro(), and also > specify the UI database. > If you are specifying "gis_ui", and it still gives you the message, then > it's likely a path issue, meaning that you'll have to specify the full > path to the ui, e.g. "C:\Program Files\Maptitude 2012\gis_ui" > Maptitude Mapping Software <http://www.caliper.com> Group Moderator > > > > --- In Maptitude@yahoogroups.com, "ivanmf_iimf" > <ivan.marcelo.ferreira@> wrote: > > > > If I change the RunMacro() by RunUIMacro() the error changes too. > > Now I got the following error message: > > > > "Couldn't find the UI database" > > > > What about now? > > > > --- In Maptitude@yahoogroups.com, maptitude-ow...@yahoogroups.com > wrote: > > > > > > Hi: > > > You should use RunUIMacro(), not RunMacro(). This lets you specify > > > exactly the UI in which the macro you want to run is located, in > this > > > case "gis_ui". > > > Example: > > > objMaptitude.RunUIMacro("G30 new layer settings", "gis_ui") > > > Maptitude Mapping Software <http://www.caliper.com> Group > Moderator > > > > > > --- In Maptitude@yahoogroups.com, "ivanmf_iimf" > > > <ivan.marcelo.ferreira@> wrote: > > > > > > > > I'm using Maptitude 6.0 Version 2012 Build 1120 32-bit > > > > > > > > --- In Maptitude@yahoogroups.com, maptitude-ow...@yahoogroups.com > > > wrote: > > > > > > > > > > Hi: > > > > > What version of Maptitude are you running? > > > > > Maptitude Mapping Software <http://www.caliper.com> Group > > > Moderator > > > > > > > > > > --- In Maptitude@yahoogroups.com, Ivan Marcelo Ferreira > > > > > <ivan.marcelo.ferreira@> wrote: > > > > > > > > > > > > Hi! > > > > > > > > > > > > We are trying to run a macro called 'G30 new layer default > > > settings' > > > > > via > > > > > > Delphi with DCOM. > > > > > > So when I run the following code, the program returns an error > > > > > "Function > > > > > > undefined". > > > > > > > > > > > > RemoteMapObject.RunMacro('G30 new layer default settings', > > > layerName); > > > > > > > > > > > > How can I solve the problem? > > > > > > > > > > > > > > > > > > > > > ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/Maptitude/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/Maptitude/join (Yahoo! ID required) <*> To change settings via email: maptitude-dig...@yahoogroups.com maptitude-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: maptitude-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/