Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

(menugroup) Doesn't do diddly squat!!!!

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
220 Views, 7 Replies

(menugroup) Doesn't do diddly squat!!!!

Greetings all,

If any of you lisp gurus have been following along on my last couple of
posts, you have probably realized that Menu files are now the bane of my
existence.

I have been trying to develop a way to switch partial menu files. Most
specifically Menu slots 12~16. I need to be able to load the partial
menu files into the ACAD menugroup. One is called schemat.mns with the
menugroup defined as HB_Schemat, the other is called Arch.mns with
menugroup HB_Arch. And for the life of me I can't make it work.

I've gotten some help from Cliff Middleton. But I am trying to use
other methods (I'm sorry Cliff, but if I can't understand the code, I
won't put it into a production environment, but I imagine that your code
will teach me a lot in the long run). After looking into no-Help files,
I found out a way to do this using the (menugroup) Lisp command. I used
the syntax that they recommended, and it still doesn't work. I even went
to the trouble of loading the HB_Schemat using MENULOAD.

I am running AutoCAD 2000 SP2 on a WINNT 4.0 SP6a 256MB RAM.

Below is a code snippet I am using

CMF

;; Beginning of menu file

//
// AutoCAD menu file - C:\Program
Files\Acad2000\support\HB_Schemat.mnc
//

***MENUGROUP=HB_SCHEMAT

***POP1
**Video Equip

ID_Video Equip [Video E&quip]
[->S&witchers]
[->&RGB]
[->&12x8]
[&Five Wire]^C^C(setq EQ_NAME "RGBSW");(setq RGB_DWG
"Crspt128HVA");RGB_SW;
[F&our Wire]^C^C(setq EQ_NAME "RGBSW");(setq RGB_DWG
"Crspt128A");RGB_SW;
[<-5 Wire &Compact]^C^C(setq EQ_NAME "RGBSW");(setq RGB_DWG
"Crspt128HVA_5BNC");RGB_SW;
[->&8x4]
[&Five Wire]^C^C(setq EQ_NAME "RGBSW");(setq RGB_DWG
"Crspt84HVA");RGB_SW;
[F&our Wire]^C^C(setq EQ_NAME "RGBSW");(setq RGB_DWG
"Crspt84A");RGB_SW;
[<-5 Wire &Compact]^C^C(setq EQ_NAME "RGBSW");(setq RGB_DWG
"Crspt84HVA_5BNC");RGB_SW;
[&4x1]^C^C(setq EQ_NAME "RGBSW");(setq RGB_DWG
"SW4ARMXHV");RGB_SW;
[<-&2x1]^C^C(setq EQ_NAME "RGBSW");(setq RGB_DWG
"SW2ARHVxi");RGB_SW;
[->VGA/&XGA]
[<-2x2 Switcher/&DA]^C^C(setq EQ_NAME "VGASW");(setq VGA_DWG
"SW2VGADA2A.dwg");VGA_SW;
[->S&ystem]
[System &5CR]^C^C(setq EQ_NAME "SYSSW");(setq SYS_DWG
"SYSTEM5CR");SYS_SW;
[System &7SC]^C^C(setq EQ_NAME "SYSSW");(setq SYS_DWG
"SYSTEM7SC");SYS_SW;
[<-System &8+]^C^C(setq EQ_NAME "SYSSW");(setq SYS_DWG
"SYSTEM8");SYS_SW;
[--]
[->&Video]
[6x1 &Composite]^C^C(setq EQ_NAME "CVIDSW");(setq VIDS_DWG
"Sw6-cvmx");VID_SW;
[&6x1 Comp and Stereo Aud]^C^C(setq EQ_NAME "CVIDSW");(setq
VIDS_DWG "SW6-AVMX");VID_SW;
[6x&2 Comp and Stereo Aud]^C^C(setq EQ_NAME "CVIDSW");(setq
VIDS_DWG "MAV62");VID_SW;
[<-&16x16 Comp and Stereo Aud]^C^C(setq EQ_NAME "CVIDSW");(setq
VIDS_DWG "MAV1616");VID_SW;
[->&Svideo]
[&Svideo and Stereo Aud Matrix]^C^C(setq EQ_NAME "SVIDSW");(setq
VIDS_DWG "MATRIX50_SVID_A");VID_SW;
[<-<-Svideo/&Video Transcoding Switcher]^C^C(setq EQ_NAME
"SVIDSW");(setq VID_DWG "YCSSW6MX");VID_SW;

;; Menu file continues, but it is unimportant

;; Beginning of Lisp File

(defun c:schemat ()
(menugroup "P12=HB_SCHEMAT.Video Equip")
(menugroup "P12=*")
)

;;Beginning of Alternate Lisp file

(defun c:schemat ()
(menugroup "GACAD.MNWINDOW= +HB_SCHEMAT.Video Equip")
)
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Anonymous

Chris,
You can load a custom menu with pull downs defined and then initiate those
pull downs anywhere you want at any time with simple "menucmd" from a tool
bar.
Is this not what you need?

Dave Alexander

"Chris Ferris" wrote in message
news:3BB491E5.A063DBE8@hbcommunications.com...
> Greetings all,
>
> If any of you lisp gurus have been following along on my last couple of
> posts, you have probably realized that Menu files are now the bane of my
> existence.
>
> I have been trying to develop a way to switch partial menu files. Most
> specifically Menu slots 12~16. I need to be able to load the partial
> menu files into the ACAD menugroup. One is called schemat.mns with the
> menugroup defined as HB_Schemat, the other is called Arch.mns with
> menugroup HB_Arch. And for the life of me I can't make it work.
>
> I've gotten some help from Cliff Middleton. But I am trying to use
> other methods (I'm sorry Cliff, but if I can't understand the code, I
> won't put it into a production environment, but I imagine that your code
> will teach me a lot in the long run). After looking into no-Help files,
> I found out a way to do this using the (menugroup) Lisp command. I used
> the syntax that they recommended, and it still doesn't work. I even went
> to the trouble of loading the HB_Schemat using MENULOAD.
>
> I am running AutoCAD 2000 SP2 on a WINNT 4.0 SP6a 256MB RAM.
>
> Below is a code snippet I am using
>
> CMF
>
> ;; Beginning of menu file
>
> //
> // AutoCAD menu file - C:\Program
> Files\Acad2000\support\HB_Schemat.mnc
> //
>
> ***MENUGROUP=HB_SCHEMAT
>
> ***POP1
> **Video Equip
>
> ID_Video Equip [Video E&quip]
> [->S&witchers]
> [->&RGB]
> [->&12x8]
> [&Five Wire]^C^C(setq EQ_NAME "RGBSW");(setq RGB_DWG
> "Crspt128HVA");RGB_SW;
> [F&our Wire]^C^C(setq EQ_NAME "RGBSW");(setq RGB_DWG
> "Crspt128A");RGB_SW;
> [<-5 Wire &Compact]^C^C(setq EQ_NAME "RGBSW");(setq RGB_DWG
> "Crspt128HVA_5BNC");RGB_SW;
> [->&8x4]
> [&Five Wire]^C^C(setq EQ_NAME "RGBSW");(setq RGB_DWG
> "Crspt84HVA");RGB_SW;
> [F&our Wire]^C^C(setq EQ_NAME "RGBSW");(setq RGB_DWG
> "Crspt84A");RGB_SW;
> [<-5 Wire &Compact]^C^C(setq EQ_NAME "RGBSW");(setq RGB_DWG
> "Crspt84HVA_5BNC");RGB_SW;
> [&4x1]^C^C(setq EQ_NAME "RGBSW");(setq RGB_DWG
> "SW4ARMXHV");RGB_SW;
> [<-&2x1]^C^C(setq EQ_NAME "RGBSW");(setq RGB_DWG
> "SW2ARHVxi");RGB_SW;
> [->VGA/&XGA]
> [<-2x2 Switcher/&DA]^C^C(setq EQ_NAME "VGASW");(setq VGA_DWG
> "SW2VGADA2A.dwg");VGA_SW;
> [->S&ystem]
> [System &5CR]^C^C(setq EQ_NAME "SYSSW");(setq SYS_DWG
> "SYSTEM5CR");SYS_SW;
> [System &7SC]^C^C(setq EQ_NAME "SYSSW");(setq SYS_DWG
> "SYSTEM7SC");SYS_SW;
> [<-System &8+]^C^C(setq EQ_NAME "SYSSW");(setq SYS_DWG
> "SYSTEM8");SYS_SW;
> [--]
> [->&Video]
> [6x1 &Composite]^C^C(setq EQ_NAME "CVIDSW");(setq VIDS_DWG
> "Sw6-cvmx");VID_SW;
> [&6x1 Comp and Stereo Aud]^C^C(setq EQ_NAME "CVIDSW");(setq
> VIDS_DWG "SW6-AVMX");VID_SW;
> [6x&2 Comp and Stereo Aud]^C^C(setq EQ_NAME "CVIDSW");(setq
> VIDS_DWG "MAV62");VID_SW;
> [<-&16x16 Comp and Stereo Aud]^C^C(setq EQ_NAME "CVIDSW");(setq
> VIDS_DWG "MAV1616");VID_SW;
> [->&Svideo]
> [&Svideo and Stereo Aud Matrix]^C^C(setq EQ_NAME "SVIDSW");(setq
> VIDS_DWG "MATRIX50_SVID_A");VID_SW;
> [<-<-Svideo/&Video Transcoding Switcher]^C^C(setq EQ_NAME
> "SVIDSW");(setq VID_DWG "YCSSW6MX");VID_SW;
>
> ;; Menu file continues, but it is unimportant
>
> ;; Beginning of Lisp File
>
> (defun c:schemat ()
> (menugroup "P12=HB_SCHEMAT.Video Equip")
> (menugroup "P12=*")
> )
>
> ;;Beginning of Alternate Lisp file
>
> (defun c:schemat ()
> (menugroup "GACAD.MNWINDOW= +HB_SCHEMAT.Video Equip")
> )
>
>
Message 3 of 8
Anonymous
in reply to: Anonymous

This is what I want. I did a typo. The code is not from my lisp file, it was
from my memory (I did it after hours out of my house and I couldn't remember
the exact command.) I meant to type (menucmd) where you see (menugroup). I
recreated the lisp file here and it still doesn't work (the menu file I
brought with me).

Whenever I try to force feed it to the vlisp console, all it returns is nil,
and doesn't change the menubar. Below is what I tried to tell it.

(menucmd "P12=HB_SCHEMAT.VIDEO EQUIP")

According to the help file, this should work!!!

What am I doing wrong??? Any help with the sytax and usage would be
appreciated.

CMF

Dave Alexander wrote:

> Chris,
> You can load a custom menu with pull downs defined and then initiate those
> pull downs anywhere you want at any time with simple "menucmd" from a tool
> bar.
> Is this not what you need?
Message 4 of 8
Anonymous
in reply to: Anonymous

"Chris Ferris" wrote
> (menucmd "P12=HB_SCHEMAT.VIDEO EQUIP")
>
> According to the help file, this should work!!!

Chris,

Try this:
(menucmd "P12=+HB_SCHEMAT.VIDEO EQUIP")


Note the "plus" sign after the "equals" sign.
Hope this helps.

Jim
Message 5 of 8
Anonymous
in reply to: Anonymous

Oops! You may need to change it to this:
(menucmd "P12=+HB_SCHEMAT.POP1")

If this doesn't work, you may need to do this first:
(command "menuload" "hb_schemat.mnu")

or change mnu to mns or mnc depending on what you want.


"Jim Nelson" wrote in message
news:046046D6B798C072851C0DFB23E3B4F5@in.WebX.maYIadrTaRb...
>
> "Chris Ferris" wrote
> > (menucmd "P12=HB_SCHEMAT.VIDEO EQUIP")
> >
> > According to the help file, this should work!!!
>
> Chris,
>
> Try this:
> (menucmd "P12=+HB_SCHEMAT.VIDEO EQUIP")
>
>
> Note the "plus" sign after the "equals" sign.
> Hope this helps.
>
> Jim
>
>
Message 6 of 8
Anonymous
in reply to: Anonymous

Thanks, I'll give it a try come monday morning

Jim Nelson wrote:

> Oops! You may need to change it to this:
> (menucmd "P12=+HB_SCHEMAT.POP1")
>
> If this doesn't work, you may need to do this first:
> (command "menuload" "hb_schemat.mnu")
>
> or change mnu to mns or mnc depending on what you want.
>
> "Jim Nelson" wrote in message
> news:046046D6B798C072851C0DFB23E3B4F5@in.WebX.maYIadrTaRb...
> >
> > "Chris Ferris" wrote
> > > (menucmd "P12=HB_SCHEMAT.VIDEO EQUIP")
> > >
> > > According to the help file, this should work!!!
> >
> > Chris,
> >
> > Try this:
> > (menucmd "P12=+HB_SCHEMAT.VIDEO EQUIP")
> >
> >
> > Note the "plus" sign after the "equals" sign.
> > Hope this helps.
> >
> > Jim
> >
> >
Message 7 of 8
Anonymous
in reply to: Anonymous

Chris, I use code similar to this to load my pulldown menus. I am loading 5 of them. It works but, I get a AutoLisp stack overflow. Do you know how to make this stop?
Message 8 of 8
Anonymous
in reply to: Anonymous

Chris
I use this in my "mnl" file to place my partial menu pull down before the
"window" position.

assumes there are not more than 21 pull-downs plus "window" and "help"
(defun civil-placemenu (/ CNT)
(setq CNT 1)
(while (< CNT 24)
(if (menucmd (strcat "P" (itoa CNT) ".1=?"))
(setq CNT (1+ CNT))
(progn
(if (> CNT 2)
(setq CNT (- CNT 2))
(setq CNT 2)
)
(menucmd (strcat "p" (itoa CNT) "=+CIVIL.pop1"))
(setq CNT 25)
)
)
)
)
(civil-placemenu)
my menu is "Civil.mns"
Hope this is of some help
cheers
Steve


"Chris Ferris" wrote in message
news:3BB4D0D6.14A623E3@hbcommunications.com...
> Whenever I try to force feed it to the vlisp console, all it returns is
nil,
> and doesn't change the menubar. Below is what I tried to tell it.
>
> (menucmd "P12=HB_SCHEMAT.VIDEO EQUIP")
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost