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

Menu File loads

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

Menu File loads

I know this question has been asked a few thousand times, but I will be
the next moron to ask.

How do you load specific menugroups in lisp?

To give you a better background, I have some custom menus that I wrote,
but I am running out of space on the menu bar. I am hoping to insert
the menu items 1~4 from Schemat.mns in menu spots 12~15 when the command
(C:Schemat) is executed. And have Menu items 1 ~3 from Details.mns to
fill in menu spots 12~14 and have menu spot 15 empty when the command
(C:DETAILS) is executed.

I am running A2K with express tools (volume 1~9) on a Winnt 4.0 machine
SP6A 256MB ram.

Any help would be appreciated,

CMF
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Anonymous

Chris,

(defun c:sdszea ()
(setvar "CMDECHO" 0)
(MENUCMD "P5=+PAA.DUCT_SIZE")
(MENUCMD "GPAA.DUCT_SIZE=*")
(SETQ SZ1 (GETSTRING))
(MENUCMD "GPAA.DUCT_SIZE=*")
(SETQ SZ2 (GETSTRING))
(MENUCMD "GPAA.DUCT_SIZE=-")
(IF (= MPFX "I") (SETQ BSZ1 4 BSZ2 2) (SETQ BSZ1 100 BSZ2 50))
(SETQ SZ1A (ITOA (+ BSZ1 (* BSZ2 (- (ASCII SZ1) 65))))
SZ2A (ITOA (+ BSZ1 (* BSZ2 (- (ASCII SZ2) 65))))
)
(SETQ DTSIZE (STRCAT SZ1A "x" SZ2A))

)

This function allows me to set duct sizes by selecting the size from a pull
down menu that is part of my menu that is loaded after the Acad menu.

Dave Alexander

"Chris Ferris" wrote in message
news:3BB320B4.14DED469@hbcommunications.com...
> I know this question has been asked a few thousand times, but I will be
> the next moron to ask.
>
> How do you load specific menugroups in lisp?
>
> To give you a better background, I have some custom menus that I wrote,
> but I am running out of space on the menu bar. I am hoping to insert
> the menu items 1~4 from Schemat.mns in menu spots 12~15 when the command
> (C:Schemat) is executed. And have Menu items 1 ~3 from Details.mns to
> fill in menu spots 12~14 and have menu spot 15 empty when the command
> (C:DETAILS) is executed.
>
> I am running A2K with express tools (volume 1~9) on a Winnt 4.0 machine
> SP6A 256MB ram.
>
> Any help would be appreciated,
>
> CMF
>
Message 3 of 8
Anonymous
in reply to: Anonymous

For what it's worth. Maybe some of the subrs in this file will help you get
started.
--
Cliff

"Chris Ferris" wrote in message
news:3BB320B4.14DED469@hbcommunications.com...
| I know this question has been asked a few thousand times, but I will be
| the next moron to ask.
|
| How do you load specific menugroups in lisp?
|
| To give you a better background, I have some custom menus that I wrote,
| but I am running out of space on the menu bar. I am hoping to insert
| the menu items 1~4 from Schemat.mns in menu spots 12~15 when the command
| (C:Schemat) is executed. And have Menu items 1 ~3 from Details.mns to
| fill in menu spots 12~14 and have menu spot 15 empty when the command
| (C:DETAILS) is executed.
|
| I am running A2K with express tools (volume 1~9) on a Winnt 4.0 machine
| SP6A 256MB ram.
|
| Any help would be appreciated,
|
| CMF
|
Message 4 of 8
Anonymous
in reply to: Anonymous

So you won't get confused, in my world the menugroup name always matches the
menu file name. You can easily modify the code.
Message 5 of 8
Anonymous
in reply to: Anonymous

;Local variables auto-written by Cliffo on August 2, 2001

Hey Cliff you are way ahead of us!


)
(
)
c[]
Message 6 of 8
Anonymous
in reply to: Anonymous

Yes, my gypsy grasshopper friend. Don't try this at home!

|
| Hey Cliff you are way ahead of us!
|
|
| )
| (
| )
| c[]
|
|
Message 7 of 8
Anonymous
in reply to: Anonymous

Thanks Cliff,

I know beggars can't be choosers, but I barely understand ActiveX, so I can't really read it let alone
edit it. And just forget about debugging any changes I make.

And since half of the functions that you used are even in the help files (Thanks again AutoDesk....) I
doubt I will ever understand this code without the lengthy process of reverse engineering.

I by no means mean this as a knock on you, more as a knock to AutoDesk's help file writers.

If you could just give me some idea as to what is going on with your code, or direct me to another
source, I would be in your debt.

Or maybe tell me where on God's green earth you learned the ActiveX extentions for Vlisp and their uses,
I could perhaps handle these more advanced functions.

Thanks again for your help

CMF

Cliff Middleton wrote:

> For what it's worth. Maybe some of the subrs in this file will help you get
> started.
> --
> Cliff
>
> "Chris Ferris" wrote in message
> news:3BB320B4.14DED469@hbcommunications.com...
> | I know this question has been asked a few thousand times, but I will be
> | the next moron to ask.
> |
> | How do you load specific menugroups in lisp?
> |
> | To give you a better background, I have some custom menus that I wrote,
> | but I am running out of space on the menu bar. I am hoping to insert
> | the menu items 1~4 from Schemat.mns in menu spots 12~15 when the command
> | (C:Schemat) is executed. And have Menu items 1 ~3 from Details.mns to
> | fill in menu spots 12~14 and have menu spot 15 empty when the command
> | (C:DETAILS) is executed.
> |
> | I am running A2K with express tools (volume 1~9) on a Winnt 4.0 machine
> | SP6A 256MB ram.
> |
> | Any help would be appreciated,
> |
> | CMF
> |
>
> ------------------------------------------------------------------------
> Name: utl_mnu.lsp
> utl_mnu.lsp Type: AutoLISP Application source (application/x-unknown-content-type-AutoLISPFile)
> Encoding: quoted-printable
Message 8 of 8
Anonymous
in reply to: Anonymous

| If you could just give me some idea as to what is going on with your code,
or direct me to another
| source, I would be in your debt.

Believe me when I say that I completely understand your frustration. I
dumped the file on you because I don't really have the time to explain it
and, not knowing your level of understanding, thought you might get some
benefit. The object model for menus, popups, etc. are for me, one of the
trickier ActiveX objects to manipulate.

| Or maybe tell me where on God's green earth you learned the ActiveX
extentions for Vlisp and their uses,
| I could perhaps handle these more advanced functions.

Trial, error, ng help. Basically you find the VBA method you need and
convert it to VLisp. (I know, easier said than done.) One tip from this
group that helped quite a bit was the apropos function in the VLIDE. It's
on a button with "(A)" on it. Type in a word such as "model" and it will
display all the functions and symbols containing that word.

*MODEL-SPACE*
acModelSpace
MODEL-SPACE
vla-get-ElevationModelSpace
vla-get-GraphicsWinModelBackgrndColor
vla-get-ModelCrosshairColor
vla-get-ModelSpace
vla-get-ModelType
vla-put-ElevationModelSpace
vla-put-GraphicsWinModelBackgrndColor
vla-put-ModelCrosshairColor

Hang in there.
--
Cliff

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

Post to forums  

Autodesk Design & Make Report

”Boost