Steven P Posted July 15 Posted July 15 I made up this one or 2 upgrades ago: (defun c:setupworkspace ( / MyWorkspace ) ;;Get workspace name to edit menubars later (setq MyWorkspace (getvar "wscurrent") ) ;;close ribbon (command "ribbonclose") ;;Show menubars / toolbar (setvar 'menubar 1) ;;menus (command "-toolbar" "draw" "s") (command "-toolbar" "draw order" "s") (command "-toolbar" "layers" "s") (command "-toolbar" "modify" "s") (command "-toolbar" "standard" "s") (command "-toolbar" "styles" "s") (command "-toolbar" "properties" "s") (command "properties") ;;ViewCube (command "DISPLAYVIEWCUBEIN2D" "Off") (command "DISPLAYVIEWCUBEIN3D" "On") ;;modelspace paper colour, RGB "255 255 255" = white "0 0 0" = black (defun somefunc (x y z) (apply '+ (mapcar 'lsh (list x y z) '(16 8 0))) ) (setenv "Background" (itoa (somefunc 255 255 255))) ;;Go to model space (setvar "ctab" (nth 0 (layoutlist) )) (setvar "ctab" "Model" ) ;;custom alerts to set up user things like papaer sizes (alert "Set up Ax Full Bleed to 0mm margins") (alert "Set up Ax Expand to 0mm margins") (alert "Set up 'DWG to PDF - No Preview.pc3'\nChange PDF Options") (alert "SP: See plotter configuration files folder, copy to AutoCAD folder") ) 1 Quote
masterfal Posted July 16 Posted July 16 oh nice. ive got very similar setup. i just use layer/styles/properties toolbars though (i havent actually looked at the others properly in such a long time so i might check out some of those other ones you've called up) was going to copy some of this to my main lisp file but no need really as you would only need to run 1 time when you upgrade to new version or something. i'll set up a separate routine. thanks! 1 Quote
rlx Posted 4 hours ago Author Posted 4 hours ago (edited) Added a few options since the first version for those who like to pimp things. Same restrictons as b4 , text display is very basic , keep them short or use wider buttons , background fill is fine for standard drawings sizes , but very large units can take some time so added option in setup dialog to tweak fill percentage. Very small drawings / zoom factor also impacts fill. But then if I have to live with these limits of lisp , so do you. Very satisfying I can tell you. App can be started with c:GrM (Graphic Menu) , you probably want to fill the app list with your favorite lisp routines and app still works by loading 'MyLisp' and then assumes it starts with (c:MyLisp). Haven't tested it on a virgin system yet so hope it runs on first use. App should display toolbar with default settings and enters a grread loop , there you can select button or press S for setup , O to change orientation (left / right / top / center / bottom) and also do some zooming, oh just read the freaking command prompt. One button(key) isn't listed , D , that was for debugging. Just left it there for those who get off pressing buttons. In setup dialog top left will show if debug mode is active. You probably use it once in you life but it could be a nice template for future apps. You also can directly go to setup dialog with (C:GrMS) Well I could go on but what be the fun in that. If I did my work app should explain itself. My reason for making this is that for every job I do I make my tools on the fly and having to edit / recompile my autocad toolbar every freaking time started to irritate me and now I just pimp my own toolbar / app-list (you can save multiple toolbar data files in the app-list dialog) Well , as you should know by now : hope you have fun or else bite me (or your mother in law) Oh , if you choose center orientation I would advise to use the fixed width / height optiom ... or not , I'm not your mommie, daddy maybe... GrM.lsp Edited 2 hours ago by rlx 1 Quote
Steven P Posted 3 hours ago Posted 3 hours ago (edited) All working. I assume the DAT file is just a list of LISPs, I am getting 'Bad argument value: non-negative: -1' ? Edited 3 hours ago by Steven P Quote
rlx Posted 3 hours ago Author Posted 3 hours ago yes the list is just a plain text file. Seems there still is a gremlin in the app , have to hunt it down... think starting setup dialog while toolbar is active is the culprit, probably better to have tootlbar and setup separate. I will have a look at this. 1 Quote
Steven P Posted 3 hours ago Posted 3 hours ago Thanks... looking good though... (oh, you do know that one day I will ask for the dragon - very cool) Quote
rlx Posted 3 hours ago Author Posted 3 hours ago found the dragon somewhere on line but not sure where anymore , but I know its way above my drafting skills haha. The error is probably the default name for the dat file , on a new system it doesn't exist yet so it has to be created , but think I forgot to put that in yet , wil check it out and update the code. Creating a file c:\\temp\\GrM-Rlx.dat might fix the error for now (that is , if that caused the error) Draak3d.dwg Quote
Steven P Posted 2 hours ago Posted 2 hours ago Cheers, I have broken my rules... weekend and CAD is off... and now it is weekend and beer time.... CAD is still on.... No, that didn't work - I'll have a look tomorrow or Monday to see if it is my machine doing something odd. Dragon is brilliant, thanks! Quote
rlx Posted 2 hours ago Author Posted 2 hours ago (edited) have nice weekend ps updated the code a little bit (create empty data file on first use) , reset environment (cleared registry / data files) but no error... usually the error you describe has to do with nth function. But I'll do some more testing to try to reproduce the error. Edited 1 hour ago by rlx Quote
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.