Hi,
Is there a way to export a list of all the blocks in a model (to a csv or txt file for example)?
TIA
Hayden
Hi,
Is there a way to export a list of all the blocks in a model (to a csv or txt file for example)?
TIA
Hayden
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)
Next
End If
hope this helps - best tom
Thanks.
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)