Visual LISP, AutoLISP and General Customization

Reply
Distinguished Contributor
amflasf
Posts: 126
Registered: ‎02-09-2012
Message 1 of 4 (295 Views)

Customization Tutorials

295 Views, 3 Replies
02-07-2013 01:33 PM

Hey CAD Peeps!

 

I am a fairly experienced CAD user and would like to improve my skills by learning how the previous CAD person set up our standard customizations here in the office.

 

We have a standard tab at the top in our pull down bar that includes a bunch of different tricks. It's all registered through an .arg file. I've included a couple snapshots to show what it is I am talking about. 1. is the pull down and 2. is one of the menus where we can have a tool palette of all our standard blocks, titleblocks, etc.

 

I would like to find some tutorials (youtube, book for dummies, etc) that can dumb things down and walk me through the process of starting this from scratch so I know how I can get my personal computer to be customized in a similar way.

 

Hope someone can help!

Thanks,

Amy

Valued Mentor
martti.halminen
Posts: 317
Registered: ‎12-31-2009
Message 2 of 4 (253 Views)

Re: Customization Tutorials

02-08-2013 02:58 AM in reply to: amflasf

The first place to start would be the Help menu in your own AutoCAD.

 

A little googling would find plenty of places, one good place to start would be

 

http://www.afralisp.net/autocad/

 

one I hit for CUI:

 

http://cad-notes.com/2012/02/exploring-autocad-cui-introduction-1/

 

- though newer documents may confuse you a little as they often use the Ribbon interface, which 2007 didn't have.

 

--

Distinguished Contributor
amflasf
Posts: 126
Registered: ‎02-09-2012
Message 3 of 4 (226 Views)

Re: Customization Tutorials

02-08-2013 11:10 AM in reply to: martti.halminen

Thank you so much for responding and providing me with some additonal information.

 

My intention will beto apply this to my computer operating with 2012 rather than the current 2007.

 

When asking the IT person had to say specific to the customization he created here.

 

The pulldown menu is a .cui file, but it requires .lsp and other files to actually perform actions. Then there are the tool palettes, which are independent of the cui, and of course the plotting customization.

 

Let me try to put into a nutshell how the menu and supporting files work. It’s been a while, but I think we have the MFLA menu, MFLA_Standards.cui, specified as the Enterprise Customization File in Options > Files tab > Customization Files. When a .cui file is loaded, AutoCAD looks for an .mnl file of the same name and loads it. An .mnl file is really just a .lsp file with a special name. In your case, MFLA_Standards.cui loads, which causes MFLA_Standards.mnl to load. That, in turn, sets a couple critical paths, loads page setups and loads the main lisp file, MFLA_Standards.lsp, which contains all of the code that runs the commands in the menu. If you open MFLA_Standards.mnl and MFLA_Standards.lsp in Notepad, you can probably decipher what’s going on. You can use the CUI command to look at the structure of MFLA_Standards.cui, the commands and so on.

 

 

I've had to read this over and over and still it takes my knowledge of CAD to a whole different level. The programming side so it's not entirely clear (tho it seems easy once I understand it) how I start from scratch creating this exact thing.

 

More insight (and dumming it down) would be appreciated.

Thanks,

Amy

Valued Mentor
martti.halminen
Posts: 317
Registered: ‎12-31-2009
Message 4 of 4 (199 Views)

Re: Customization Tutorials

02-11-2013 01:37 AM in reply to: amflasf

Some things to note:

 

- never use the original cui files in another AutoCAD version, it may overwrite them with a newer version making them unusable with the old system. So work with a copy.

 

- 2012 actually uses .cuix files. The .cui files are raw XML, .cuix is zipped and may contain several components.

Either way, you operate on them using the CUI editor.

 

- Don't use Notepad, your AutoCAD has its own programming environment for Lisp. Type VLIDE on the AutoCAD command line.

 

- Using .mnl files gives you the autoloading behaviour, otherwise it doesn't matter whether you use .lsp or .mnl files, just so make sure the stuff has been loaded when the menus need it.

 

 

 

--

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community