soan Posted January 27, 2016 Posted January 27, 2016 Hi, I search for Lisp for insert block faster. Ex.: if a write "1" on keyboard, i can insert "block 1" in my drawing. I can insert "block 1" until a stop the LISP if a write "2" on keyboard, i can insert "block 2" in my drawing. I can insert "block 2" until a stop the LISP All my block are in the same drawing. Thanks a lot Quote
ReMark Posted January 27, 2016 Posted January 27, 2016 Do you really think using a number as a way to invoke a lisp routine for inserting a block is a good idea? What happens after you have loaded and run the lisp routine 1.lsp the first time you actually need to use the number "1" in your drawing as an actual number? Quote
RobDraw Posted January 27, 2016 Posted January 27, 2016 With all of the ways available for inserting blocks, LISP is hardly necessary. Are you maybe looking for something that will insert the same block multiple times without needing to use the COPY command? Quote
Cad64 Posted January 28, 2016 Posted January 28, 2016 Insert Multiple Blocks: https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Insert-multiple-blocks-s.html Quote
BIGAL Posted January 28, 2016 Posted January 28, 2016 Remark (defun c:39 () (setvar "osmode" 39)) LINE pick point drag mouse with ortho on type 39 no probs line is 39 long. But yeah insert blocks palette, slides, menu etc lots of ways. Quote
hanhphuc Posted January 28, 2016 Posted January 28, 2016 Remark (defun c:39 () (setvar "osmode" 39)) LINE pick point drag mouse with ortho on type 39 no probs line is 39 long. But yeah insert blocks palette, slides, menu etc lots of ways. Using defun c:39 just need one step, simply invoke command 39 Alternative, If blocks exist in drawing, i prefer a simple defun using initget & getkword just setq bn (eg: block name is 39) etc.. (command "insert" bn pt 1) But this requires 2 steps, invoke command , then 39 Quote
Cad64 Posted January 28, 2016 Posted January 28, 2016 I have moved this question to the Autolisp section: http://www.cadtutor.net/forum/forumdisplay.php?21-AutoLISP-Visual-LISP-amp-DCL Quote
BIGAL Posted January 28, 2016 Posted January 28, 2016 B29 B43 B56 it can be done look at this http://www.cadtutor.net/forum/showthread.php?93661-Lisp-for-fillet-radius./page3 just add a "B" option. Quote
hanhphuc Posted January 29, 2016 Posted January 29, 2016 B29 B43 B56 it can be done look at this http://www.cadtutor.net/forum/showthread.php?93661-Lisp-for-fillet-radius./page3 just add a "B" option. That's great idea by reactor im sure many draft persons love this!! p/s : ive seen many draft using number defun (c:30 c:40 etc..) as snapang etc.. may conflict? due to defun is global variable Quote
BIGAL Posted January 29, 2016 Posted January 29, 2016 I may add the "B" option it may rain this weekend. So long as the block name has no spaces it should work. So thats "B" "C" "O" & "F" used, any other ideas anyone. 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.