totalblackout Posted October 20, 2008 Posted October 20, 2008 Hello, Im new here and was just wondering if there was a lisp routine or anything similar that would allow me to automatically load multilines that I have instead of having to go into the box and pick them each time i want to load a different one. thanks Quote
tzframpton Posted October 20, 2008 Posted October 20, 2008 Make all your Multilines that you will use, then save them all as a BLOCK. then when you want to use them, IMPORT them in and it will carry all the Multiline Styles with them. Or create a Template file for a fresh Drawing with them preloaded. Either way will work. Quote
totalblackout Posted October 20, 2008 Author Posted October 20, 2008 what i meant by automatically load them was if i were to create a pull down menu and have each multiline under that pull down. i dont know if that makes sense or not. Quote
tzframpton Posted October 20, 2008 Posted October 20, 2008 No it makes sense, but what you're wanting is a bit much, honestly. It's just as easy if you Import them using the Tool Palettes or something. This is how you can create Custom Tools and Commands available without learning programming. Quote
totalblackout Posted October 20, 2008 Author Posted October 20, 2008 the company i work with deal with CAD/Microstation programming. the 2 guys that do the program are much more familiar with MS rather than AutoCAD. One of our clients all of there menus are customized and this is a new one that they are wanting to incorporate into their standards. Quote
ASMI Posted October 20, 2008 Posted October 20, 2008 You can to save all multiline styles you need in acad.mln file (look for it in Support folder) and call it with lisp expression: (command "_.mline" "_st" "Your_Style_Name") And call this expression from Toolpallete, Toolbar, Dropdown menu or write short lisp command to call from command line. For example: (defun c:ml1() (command "_.mline" "_st" "Your_Style_Name") (princ) ); end of c:ml1 If a multiline style does not exist in acad.mln dialog window Multiline Style will appear! Quote
totalblackout Posted October 20, 2008 Author Posted October 20, 2008 ok thanks guys. ill let the guys know about that. one of them was just looking on the autodesk developers site and they couldnt get an answer there. apparently what they want is to get rid of that dialogue box that comes up from when you use the MLSTYLE command. Quote
ASMI Posted October 20, 2008 Posted October 20, 2008 You can to pass MLSTYLE dialog window and acad.mln file. All loaded multiline styles stored in "ACAD_MLINESTYLE" dictionary and you can to add styles. This of one of my functions for multiline styles addition: (defun asmi-mlStyleCreate(Quont / dxfLst topOrd Count mlDict) (setq dxfLst (list'(0 . "MLINESTYLE")'(102 . "{ACAD_REACTORS")'(102 . "}") '(100 . "AcDbMlineStyle")(cons 2(strcat(itoa Quont)"_PLINES")) '(70 . 0)'(3 . "")'(62 . 256)'(51 . 1.5708)'(52 . 1.5708) (cons 71 Quont)) Count 0.0 topOrd(-(/ Quont 2.0) 0.5) ); end setq (repeat Quont (setq dxfLst(append dxfLst (list(cons 49(- topOrd Count)) '(62 . 256) '(6 . "BYLAYER"))) Count(1+ Count) );end setq ); end repeat (if (null (member (assoc 2 dxfLst)(dictsearch(namedobjdict)"ACAD_MLINESTYLE"))) (progn (setq mlDict (cdr (assoc -1 (dictsearch(namedobjdict)"ACAD_MLINESTYLE")))) (dictadd mlDict(cdr(assoc 2 dxfLst))(entmakex dxfLst)) ); end progn ); end if (strcat(itoa Quont)"_PLINES") ); end of asmi-mlStyleCreate You can to try add for example "6_PLINES" style with 6 lines: Command: (asmi-mlStyleCreate 6) "6_PLINES" You can to add other mline properties as linetypes and offset distances between lines as arguments. Quote
rustysilo Posted October 20, 2008 Posted October 20, 2008 I say just add them to the standard template that all new dwgs will be created from as that will save you from creating a pulldown, toolbar button, etc. For older dwgs created prior to this addition to the template just create a button or menu item in the pulldown that inserts either the template dwg or a block (as stykface suggested) and then cancels or escapes out of the block insert after the definition is added. 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.