Jump to content

Recommended Posts

Posted

Afternoon.

 

I've got a little problem trying to make a menu command to load a partial customisation file.

 

I've created ths macro:

 

 ^C^C_filedia;0;menuload;N:/CAD/2D/blahblahblah.cuix;filedia;1;

 

...which seems to run fine and loads the CUI, but the popdown menu defined herein will not display on the menubar.

 

I've also tried the same thing in LiSP:

 

 (command "filedia" "0" "menuload" "N:/CAD/2D/blahblahblah.cuix" "filedia" "1")

 

...but with the same result. When typing the commands in manually one-by-one it displays fine. It's just when I try to automate it it fails.

 

Does anybody have any bright ideas how to fix this ?

 

Cheers.

 

Rob.

Posted

AFAIK, the results you are getting are to be expected. I have a lisp routine that loads various pull-downs from multiple CUI files, and it loads the menu AND there is additional code to place the menu in the menu bar (to make it visible).

Posted

Thanks for your reply.

 

Is this code readily available to make the pulldown visible ?

 

Also, is there actually a reason why this happens...or is it just another "Autodesk-ism" ?

 

Cheers.

 

Rob.

Posted

Well, I assume that the dialog version of MENULOAD, does the loading for you, and always puts the pull down at the far right end.

Using code allows you to place the pulldown wherever you want.

 

It's not that difficult - but you will have to use lisp and the ActiveX object model.

So basically, load the menu first like you are doing (other than you'll need an object reference to it), then use (vla-InsertInMenuBar) to make it visible.

 

ActiveX Object Model: http://www.afralisp.net/reference/autocad-object-model.php

Posted

Thanks for that. Lisp programming was never my stong point. I'll see what I can do with that...but you'll probably hear from me again in the near future when I've knackered it !

 

Cheers.

 

Rob.

Posted

Yea, if you need more help, post back. I can't copy/paste the actual code here (it's not mine), but I point you in the right direction if you get stuck...

The Afralisp link has good stuff also, as well as the VL Developers Bible.... http://cadpanacea.com/node/111

Posted

Morning,

 

I've sorted it now. I've written the command into an external lisp file and used (if (not c:anotherlisp)(load "anotherlisp")(princ));anotherlisp; to load the external lisp and run it. For the same reasons as you I'll not paste the contents of that lisp file.

 

Thanks a lot for you help and your links.

 

One day I'll know what I'm doing !

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...