you need to write a function to take a block name, and return an integer of the number of blocks below it.
Then run that recursively on any block you find and recored the deepest level.
So that's the concept, it would take me a while to write the code since recursive stuff is tricky.
I'll see if I can put something together as I know I've seen code to look through blocks like this.
James Maeding
|>you would iterate through the block object looking for other blocks.
|>Keep following that trail til you exhaust the blocks, and the trail that went the furthest is the winner.
|>Do not assume there will only be one block within a given block.
|>
|>I'm wondering how this is so urgent when its fairly obvious to anyone doing .net api stuff. Block tables are the first
|>thing you learn. You have to deal with them to draw anything. It sounds like you have more to learn than just block
|>table objects.
|>
|>It will take a few hours to develop the code on your end so I hope you have at least that, and are good at writing and
|>testing .net code in acad.
|>
|>raji <>
|>|>Dear Friends,
|>|>
|>|>
|>|>Can any one help me ,how to count the number of levels for nested blocks?
|>|>
|>|>For Example
|>|>
|>|>Block 1 -> Block2 and Block3 (nested Blocks)
|>|>
|>|>So Block 1 number of Level is one.
|>|>
|>|>But
|>|>
|>|>Block 4 - >Block 5 and Block6(nested Blocks)
|>|>
|>|>Block 7 ->Block 1 and Block4
|>|>
|>|>So how get the number of Levels for Block 7 in .net?
|>|>Pls give some idea or samples friends....?
|>|>
|>|>Very Urgent..............................!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|>|>
|>|>
|>|>Thank u Friends.
|>James Maeding
|>Civil Engineer and Programmer
|>jmaeding - at - hunsaker - dotcom
James Maeding
Civil Engineer and Programmer
jmaeding - at - hunsaker - dotcom