+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Forum Newbie
    Using
    AutoCAD 2016
    Join Date
    Apr 2016
    Posts
    3

    Default Count Specific Block Name and Insert Block to Coords Depending on Block Count

    Registered forum members do not see this ad.

    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

  2. #2
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,036

    Default

    Did you google for "retrieve block names nested block" lots of suggestions.
    like this http://forums.autodesk.com/t5/visual...k/td-p/2991102
    A man who never made mistakes never made anything

  3. #3
    Forum Newbie
    Using
    AutoCAD 2016
    Join Date
    Apr 2016
    Posts
    3

    Default

    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

  4. #4
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,036

    Default

    Have a look at my alst post here its a starting point for what you want

    http://www.cadtutor.net/forum/showth...ltiple-layouts
    A man who never made mistakes never made anything

  5. #5
    Forum Newbie
    Using
    AutoCAD 2016
    Join Date
    Apr 2016
    Posts
    3

    Default

    Registered forum members do not see this ad.

    Thank you,

    I will have a look and try to edit it to suit my needs!

Similar Threads

  1. Attributed block count/ extraction
    By onlyonealice in forum AutoCAD Drawing Management & Output
    Replies: 6
    Last Post: 21st Nov 2012, 04:13 am
  2. block count
    By cadamrao in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 23rd Nov 2011, 02:37 pm
  3. Text or Block Count
    By johnengineer in forum AutoLISP, Visual LISP & DCL
    Replies: 30
    Last Post: 5th Sep 2009, 11:33 pm
  4. Block Count
    By tyoung53 in forum AutoCAD General
    Replies: 2
    Last Post: 5th Jun 2008, 10:04 pm
  5. Block Count Table
    By Ozymandias in forum AutoCAD Drawing Management & Output
    Replies: 19
    Last Post: 3rd Dec 2007, 03:21 pm

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts