Export List of Blocks


Is there a way to export a list of all the blocks in a model (to a csv or txt file for example)?


Dear Hayden, something like this is very easy with rhinoscript if you re on the windows side:

the sample will print all Block-Definition-Names to the commandline - F2 - copy -> texteditor …

Dim arrBlocks, strBlock
arrBlocks = Rhino.BlockNames(True)
If IsArray(arrBlocks) Then
  For Each strBlock In arrBlocks
    Call Rhino.Print(strBlock)
End If

hope this helps - best tom

1 Like


Here is a python script that exports all block definition names to a text file. Note that even if there are are no instances of a block definition in the file, the definition will be written if it exists in the Rhino file - i.e. there is no checking done to see if a definition has any active instances.

ExportBlockNames.py (721 Bytes)

1 Like

@Helvetosaur - Yiou are a god!