lamensterms Posted February 20, 2014 Share Posted February 20, 2014 Hey guys, I'm just in the process of creating some menus (strictly menus, no toolbars, no ribbons, etc) and my original goal was a type of block library menu as per BigAl's post here. Fair to say I am struggling a little, I have never done any .MNU coding before. But it seemed like a good way to produce menus quickly, then once completed I can transfer them into the .CUIX file. I have done come menu creation via the .CUIX file in the past, and it isn't exactly a quick process. So, I was just wondering if you guys could advise me on whether or not the .MNU path is the right one for me to explore. Or if you have any other suggestions. Here is what I would like to achieve: - Create block library menus as per BigAl's post here. - Incorporate and sort all my LISP command/routines into some rational and organised order. - Link to various directories via Windows Explorer (or Directory Opus). One thing I have been struggling with so far is how to create multiple fly-out/cascading menus from a single pulldown menu. For example, in BigAl's .MNU code, his head menu is titled "LIBRARY", he then has a sub-menu titled "Stddwgs", which leads to calls for block libraries. I would like to know how to create multiple sub-menus under the "LIBRARY" head. Also... how are these block library/menus created? What is the syntax for them? Sorry about the multiple questions, this may be too much for one thread. Any direction is greatly appreciated. Thanks a lot for any help guys, I look forward to hearing back. Quote Link to comment Share on other sites More sharing options...
Bhull1985 Posted February 20, 2014 Share Posted February 20, 2014 Hello again. I have within the last 6 months created a similar program, for piping drawings- p&ids specifically. I've outlined how my program works in this thread, which has embedded pictures for easy viewing. http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/custom-CUI-help-for-blocks-please/m-p/4751905#M318515 This program is cui/mnu/lisp/dcl driven, mainly lisp though. The program will insert any fitting or equipment into space, or if placed onto a line or lwpolyline, the program will trim the line after establishing the standards for each item being inserted, such as setting the proper layer. The program is fully capable of creating p&ids from scratch, as in every item that we need is somewhere in my program. The majority of selections are made via a dcl dialog , what's shown in the images are slides of blocks so the user does not have to type or know the name of the item they are attempting to insert. I can share the source code or help you create your own, or additionally answer any questions you may have if you try to create your own program- lord knows I couldn't have made mine without the help of amazing people on these forums. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 21, 2014 Share Posted February 21, 2014 First up the second windows are not opening so here goes. The mnu is just a text file I find it easier to create partial menu's outside of the main CUI just think what happens when you upgrade ? A mnu has different parts pops, images, digitiser, screen its just knowing how to use the different sections. before cui the old mnu where easily accessible so you could look at code. If the image select method is what your after using slides then you do not need to write any special code to dispaly its just part of the Image section and uses slides. If you want more control then you can go down the dialouge path and use again images(jpg) I have 2x2 3x3 4x4 4x4 etc dialouges, like bhull page opened nicely done, these are a bit more complex require more coding and use of DCL's. Using slides I can here the roar its old fashioned is pretty easy using a script to make them screasm through all yourblocks, part two is that you can combine them all into 1 file a SLB so the link becomes two part slidename,slidelibrary. A nice thing is Autocad will auto page the images for you with the NEXT button turning on if to many for one screen. The other reason I use slides is I make a snapshot how I want it to look not what the image looks like as its saved removing the junk like dims. Toolbars are similar not that hard to make also I have copied the info from the main cui into notepad to make my own custom toolbars a combo of Autocad plus my own icons. Last message keep what you do seperate as partial menus MNU. An Example this will load using menuload the $i is image $s is screen etc ***MENUGROUP=STDS ***POP15 **CADLIB [LIBRARY] [->Stddwgs] [TRENCH]$I=STDS.TRENCH $I=* ... ... [MISC]$I=STDS.MISC $I=* [<-] [->LISP1 A-B] [Add 2 Level]^C^C(LOAD "add-to-levels") ... ... [<-] ***image **TRENCH [TRENCH] [sLD(101,KERB)]^C^C(openblk "P:/ACADSTDS/CIVIL STANDARDS/101") [sLD(102,NATURE)]^C^C(openblk "P:/ACADSTDS/CIVIL STANDARDS/102") Quote Link to comment Share on other sites More sharing options...
lamensterms Posted February 21, 2014 Author Share Posted February 21, 2014 Hi BigAl and Bhull1985, Wow, thanks for all the info guys. I think I'm finally starting to understand the MNUs and image menus (with the additional help of this). Im starting to think that the MNU will be good for quickly creating menus (calling commands and linking to explorer directories and such), but I think if I were to use it to create a block collection, I will be forever creating slides and rebuilding slide libraries and so forth (seeing as our block collection is still in its infancy). I know nothing about DCL, but it seems like a better option, if I ever get time to learn the language. In the mean time, I'm going to have a crack with BLK_LIB (thanks to TerryCAD), and see how I go with that. Thanks again for the advice guys, I will post back once I get into the nitty-gritty of the MNU coding. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 23, 2014 Share Posted February 23, 2014 Just a quick one you can add items to the image section but just put a blank slide in the menu ie you can have the same slide as many times as you like this way you can add items by name and then when time permits add the image. Quote Link to comment Share on other sites More sharing options...
lamensterms Posted February 23, 2014 Author Share Posted February 23, 2014 Hi BigAl, Thanks a lot for the addition tip, just wondering... Is it possible to create a dialogue box without any images/previews? So the idea would be to just have a dialogue box with only a text list of items to insert as blocks. Can this be done with MNU? Thanks again for the ongoing help. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 24, 2014 Share Posted February 24, 2014 In the example above using a image mnu the words you see would be Kerb then next line Nature if the slides do not exsit then just blank, use menuload and try this example there are no slides available. try ***MENUGROUP=BIGAL ***POP15 **CADLIB [LIBRARY] [->Stddwgs] [CARS]$I=CARS $I=* [<-] ***image **CARS [CARS] [(ambalance_access,ambu1)]^c^c-INSERT P:/Autodesk/blocks/cars/ambalance_access DRAG \1 1 0 [(bmw535,Bmw535)]^c^c-INSERT P:/Autodesk/blocks/cars/Bmw535 DRAG \1 1 0 [(Bus,Bus)]^c^c-INSERT P:/Autodesk/blocks/cars/Bus DRAG \1 1 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.