Hello,

> Does anyone know how to get one MapBasic application to call a certain item
> off a custom menu item created by another MBX? This would be like the "Run
> Menu Command xxx" function in MapBasic, but there is no code for custom
> menu items. I tried to add an 'ID' to the menu item and call it that way,
> but it did not work.

I have tried to use Run Menu Command ID from another MBX, and it worked:

File Menu1.mb:

declare sub uu
declare sub aa

alter menu "File" Add "UU" ID 1001 Calling uu
alter menu "File" Add "AA" Calling aa

sub uu
  note "uu called"
end sub

sub aa
  Run menu command id 1001
end sub

File menu2.mb:

declare sub aa2

alter menu "File" Add "AA2" Calling aa2

sub aa2
  Run menu command id 1001
end sub

When selecting File > AA2, sub UU from Menu1.mbx is called (message
"uu called") is displayed.

Dmitry

Dmitry Bogdanov
GIS Department Manager
Kiev Software Factory Ltd.
room 46 9/12 Baumana St, Kiev, Ukraine 252190
Tel: (380 44) 442-6077; (380 44) 443-7925
Fax: (380 44) 443-7925
Internet: http://www.ksf.kiev.ua

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to