+ Reply to Thread
Results 1 to 2 of 2

Thread: IsBlock on Nested Blocks

  1. #1

    IsBlock on Nested Blocks

    Here is the issue I ran into, I am trying to find blocks that are nested inside other blocks. In the attached file blocks "Part 1" and "Part 2" are nested inside "SubAssembly 1". If I do the follow nothing is returned.

    Code:
    Block='SubAssembly 1'
    
    BlkObj = rs.BlockObjects(Block)
    for e in BlkObj:
        if rs.IsBlock(e);
         print (e)

    but if I do this then it returns 4096 which are block objects.

    Code:
    BlkObj = rs.BlockObjects(Block)
    for e in BlkObj:
         print (rs.ObjectType(e))
    What am I missing here.

    Dennis
    Attached Files
    Last edited by djnelson75; 07-03-2012 at 07:52 PM.

  2. #2
    Senior Member Steve Baer's Avatar
    Join Date
    Apr 2010
    Location
    Seattle
    Posts
    1,472
    Blog Entries
    19
    Hi Dennis,
    I can see where this is confusing. There are two functions
    IsBlock and IsBlockInstance
    IsBlock refers to the single block definition in the definition table. IsBlockInstance refers to the individual RhinoObjects that point back at the instance definition.

+ Reply to Thread

Tags for this Thread

Posting Permissions

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