Select A Part From A Block

I’m using VBScript. In a block I have a circle (its the only line). I’d like to write a script where it asks for a block, loops through the block definition to find the line, and records the diameter for reporting purposes.

I have many instances of this block object in a model, each scaled uniformly to different sizes. I need to know the size of these objects.

http://4.rhino3d.com/5/rhinoscript/block_methods/blockobjects.htm

1 Like

Geez. Thank you for googling that for me.

In your case the BlockObjects may not be ideal since it will list (return IDs) of the objects making up the block definition and not the objects of each instance, that are scaled etc.

So you may need to either make a copy of each instance, explode, measure your diameter and delete, or get the dimension of your curve from BlockObjects and figure our the scale by getting the transform parameters of each block instance.

1 Like

Thanks Jarek. Yeah, I see that Dale’s post gives me the definition.

The definition of the circle has a 1mm diameter. I’ve not worked with transformation matrixes, but I should be able to work out the new diameter based on the scale of the instance.