Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 6020

Python script to export STLs

$
0
0

@declan wrote:

Hi all,

Could someone help me tidy up this script to export a group of objects as individual STL files?

import rhinoscriptsyntax as rs

objects = rs.GetObjects("Select objects to export", 16)

for x in objects:
    name = rs.ObjectName(x)
    stlName = ((rs.DocumentName()).split('.')[0]) + "_" + name + ".stl"
    commandString = "-_Export " name "_Enter" + stlName + " _Enter " + "_Enter"
    rs.Command(commandString)

Thanks!!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6020

Trending Articles