Bob_W Posted October 27, 2021 Share Posted October 27, 2021 I have attached a Lisp program that I got many years ago from Cadalyst Hot tip Harry’s. https://cadtips.cadalyst.com/ I have no way to contact the original author, Ray Burnstad. I would like to have the bubble be put on it’s own layer. I have looked to see how to do it but my Lisp knowledge would not fill the subject line. Since this was a free to download and use I don’t know if there would be a problem with modifying it. If this is not allowed I understand. Thanks Bob_W BUB.lsp Quote Link to comment Share on other sites More sharing options...
mhupp Posted October 27, 2021 Share Posted October 27, 2021 (edited) Looks like it puts the bubble on the current layer. either change your current layer before running the command or Change the following in the lisp. update "layername" to the layer you want ; Main function (defun C:BUB (/ SS TXTLIM LL UR MP NX NY P1 olay) (setq olay (getvar 'clayer)) ;saves current layer before changing it in next line. (setvar 'clayer "layername") ;layer name you want the bubble to be on. end of main function (setvar 'clayer olay) ;sets current layer back to before the lisp (princ) ) There is also an function missing in this lisp that causes it not to run successfully. ; ----- Error around expression ----- ; (BUB_NOTE_GET_POINT) Make sure you have the all of the lisp loaded. https://cadtips.cadalyst.com/notestext/bubble-note Edited October 27, 2021 by mhupp Quote Link to comment Share on other sites More sharing options...
Bob_W Posted October 27, 2021 Author Share Posted October 27, 2021 First - Thank You FYI, the link you showed is actually a different lisp by the same author. The original bub.lsp seems to be gone. The one I originally attached runs OK Using the code you provided I can now get the bubble on it's own layer. I had to make some changes, at first I could not make it work. Most likely my fault. It does not change back to the current layer, again I'm probably putting it the wrong location or lost a parentheses or ??? Can you show where it goes, original end of main function below; (setvar "SNAPMODE" SM) (setvar "CMDECHO" 1) (setq *ERROR* OE) )) (princ) ) ; Draws bubble border polyline Quote Link to comment Share on other sites More sharing options...
tombu Posted October 27, 2021 Share Posted October 27, 2021 BUB-NOTE.LSPI downloaded it and added an option for Caligraphy Style in Sept'03. Haven't used it in many years. 1 Quote Link to comment Share on other sites More sharing options...
ronjonp Posted October 27, 2021 Share Posted October 27, 2021 2 hours ago, Bob_W said: First - Thank You FYI, the link you showed is actually a different lisp by the same author. The original bub.lsp seems to be gone. The one I originally attached runs OK Using the code you provided I can now get the bubble on it's own layer. I had to make some changes, at first I could not make it work. Most likely my fault. It does not change back to the current layer, again I'm probably putting it the wrong location or lost a parentheses or ??? Can you show where it goes, original end of main function below; (setvar "SNAPMODE" SM) (setvar "CMDECHO" 1) (setq *ERROR* OE) )) (princ) ) ; Draws bubble border polyline Add this line and you don't have to worry about the current layer changing: 1 Quote Link to comment Share on other sites More sharing options...
Bob_W Posted October 28, 2021 Author Share Posted October 28, 2021 Thank You ronjonp That makes it work as I wanted. I made a 'bubble' layer to set color and lineweight for the 'bubble" I'm sure that can be done in the lisp but a layer works fine. Bob_W Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 28, 2021 Share Posted October 28, 2021 (edited) I have a library routine chklay that just does that checks does layer exist, if not make it (chklay "Bubble" 2 "DASHED") . Or can do (command "Layer" "M" "Bubble" "c" 2 "Bubble" "lt" "Dashed" "Bubble" "") as make layer will continue if it exists. Edited October 28, 2021 by BIGAL Quote Link to comment Share on other sites More sharing options...
Dadgad Posted October 29, 2021 Share Posted October 29, 2021 I am not a member of the Lisperatti, so out of my depth... but I use and love LeeMacs awesome LAYER DIRECTOR lisp Thanks @LEEMAC ! which would be able to do this for you. When in doubt? Check LeeMac out! Quote Link to comment Share on other sites More sharing options...
OMEGA-ThundeR Posted November 2, 2021 Share Posted November 2, 2021 On 10/28/2021 at 3:29 PM, Bob_W said: Thank You ronjonp That makes it work as I wanted. I made a 'bubble' layer to set color and lineweight for the 'bubble" I'm sure that can be done in the lisp but a layer works fine. Bob_W Sure it can be done. It was stated in a way like that by @BIGAL in the post above yours. You can also check the '-layer' (with the - in front of it) command to see what options you have to create a layer with the style you want. Something like below (not tested!) would create a layer named 'LAYERNAME' that is megenta, not visible on plot and has a dashed linetype. (command "-Layer" "make" "LAYERNAME" "color" "magenta" "" "plot" "n" "lt" "Dashed" "") Quote Link to comment Share on other sites More sharing options...
Bob_W Posted November 2, 2021 Author Share Posted November 2, 2021 I wanted to thank everyone that provided info for me. 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.