benzson11 Posted February 17, 2021 Posted February 17, 2021 Hi Everyone, I'm trying to create a lisp routine that will create a block of all the objects inside a file and name the block same with the drawing file name. I have manage to do this. But I have encountered some problem. 1st. My lisp won't continue so I add a save and close in the routine. 2nd. I need to add an conditional function that will explode if there is a block found and continue if none is found. Any suggestion on how I will approach this problem and or improve my lisp routine. I attach the lisp routien and sample drawing file. QB-BENZSON.LSP R3-1(A).dwg Quote
BIGAL Posted February 17, 2021 Posted February 17, 2021 Not a good practice to get into blocking a whole dwg. I have had dwg's submitted and took a while to find but had a complete other dwg saved as a block but not used so bloated the dwg. If you save a dwg you can Insert it into another dwg this would be a better way are you trying to do some form of I want these objects in a new dwg, is not a DWT template dwg for that task ? 2 Quote
benzson11 Posted February 17, 2021 Author Posted February 17, 2021 Hi Bigal thank you for your response. I just need to create the 3d solids with circle reference as block. I will use it on the dynamo script that I'm working on. It wont insert 3d solid but will insert blocks inside the drawings. Quote
sergio javo Posted February 21, 2021 Posted February 21, 2021 Hey guys. @benzson11 don´t use "_A" in (setq selectionset (ssget "_A" '((0 . "3DSOLID,*SURFACE,CIRCLE")))) use "x" (setq selectionset (ssget "x" '((0 . "3DSOLID,*SURFACE,CIRCLE")))) "All" or "al" is used in (command ".erase" "all" "") for example. In the ssget function to select everything "x" is used. I changed the purge command too. I changed your file, test if that's how you wanted it. Sorry my english from google translator. Because I don't speak English. QB-BENZSON - new.LSP 1 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.