PDA

View Full Version : autoload menu



inner69923
2004-07-15, 10:01 AM
dont know if this is the exact place for this question
i have a macro vba, and i call the public sub's using a menu (*.mns), just using something like
ID_Consulta [Consulta]^C^C-vbarun;"C:/Archivos de programa/Inner/inner_v0.60.dvb!M1.Consulta";

but first of all the user must load the *.mns file from tools/custom/menu in acad2004/2005

i know the expresstoolds are 'autoloaded' just after installing and the user dont need to load them, and wanna know how can i do it, what do i have to modify?

jwanstaett
2004-07-15, 11:51 AM
Have they change form 2002. in 2002 if load a menu the next time you open up Autocad that menu is load. Did this change in 2004&2005

inner69923
2004-07-15, 12:00 PM
nop, it hasnt changed
but i wanna know how to load a menu with no user-participation, ie, adding files or any kind of configuration with an installer

jim.vipond
2004-07-16, 07:59 AM
Why not get your vba app to load on demand.
i.e. check to see if the menu is loaded and if not then load it.
There will be numerous ways to do this, rightly or wrongly the easiest is probably to use
.sendcommand with a one line lisp expression.

Jim

inner69923
2004-07-16, 12:08 PM
finally i am using an vb exe to run autocad and insert a new menu
but i cant send this command, it is cutted by autocad in spaces

comando1 = Chr(vbKeyEscape) & Chr(vbKeyEscape) & "-vbarun" & Chr(59) & "C:/Archivos de programa/InnerSoft/inner.dvb!M1.Consulta" & Chr(59)
Set newMenuItem = newMenu.AddMenuItem(newMenu.Count + 1, "Consulta", comando1)

Comando: -vbarun Se está iniciando el sistema VBA...
Nombre de la macro: C:/Archivos
No se encontró la macro.
Comando: de Comando "DE" desconocido. Pulse F1 para obtener ayuda.
Comando "PROGRAMA/INNERSOFT/INNER.DVB!M1.CONSULTA" desconocido. Pulse F1 para obtener ayuda.

why?
this was running on mns
ID_Consulta [Consulta]^C^C-vbarun;"C:/Archivos de programa/InnerSoft/inner.dvb!M1.Consulta";

inner69923
2004-07-16, 01:14 PM
ive got it
comando1 = Chr(vbKeyEscape) & Chr(vbKeyEscape) & "-vbarun" & Chr(32) & Chr(34) & "C:/Archivos de programa/InnerSoft/inner.dvb!M1.Consulta" & Chr(34) & Chr(32)