kylaughlan Posted January 10, 2017 Posted January 10, 2017 Hi there, I'm looking for a Lisp routine that can count the number of one specific nested block (it will always have the same name) within a single layout, and then automatically insert the same block (which doesn't need to be nested) to differing coordinates depending on how many of that block there already is. I am having doubts to whether this would even be possible but I thought I would ask. Seeing as nested blocks can be counted through Lisp, I figured it might be possible. I've began to explore the world of Lisp and am using a few different routines currently. They work great but I am nowhere near at a stage where I can write a detailed Lisp routine myself. [using AutoCAD 2017 full version] Thanks guys, Kyle Quote
BIGAL Posted January 11, 2017 Posted January 11, 2017 Did you google for "retrieve block names nested block" lots of suggestions. like this http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-nested-blocks-out-of-a-block/td-p/2991102 Quote
kylaughlan Posted January 11, 2017 Author Posted January 11, 2017 Hi, thanks for the suggestion but that is not quite what I'm looking for. Looking back at my original post I realise that I have asked the wrong question. The block in question will no longer be nested. So, the block will simply need to be counted from within PS. (That is, the block will be in paper space and I will also be in paper space.) Then, a block with the same name would then be inserted into paper space at coordinates relative to the block count found. For example: Block count = 1, insert block at 0,0,0 Block count = 2, insert block at 0,50,0 Block count = 3, insert block at 0,100,0 ...and so on. Thanks Quote
BIGAL Posted January 12, 2017 Posted January 12, 2017 Have a look at my alst post here its a starting point for what you want http://www.cadtutor.net/forum/showthread.php?99463-Lisp-Request-Select-object-in-paperspace-in-across-multiple-layouts Quote
kylaughlan Posted January 12, 2017 Author Posted January 12, 2017 Thank you, I will have a look and try to edit it to suit my needs! 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.