I am writing a Rhino script to export the selected Objects into a DXF file. As each object in the 3dm has a name nearby. So during the selection, I am selecting all the curves + the name.
I have started a script like this, but the problem is I do not want to loop through all the selected objects to find the text. Is there a fast way to get the Text string out from the selection?
arrObjects = Rhino.GetObjects("Select objects for export as .DXF", 4 + 512, True, True, True) If IsArray(arrObjects) Then For Each strObject In arrObjects If Rhino.IsText(strObject) Then strFileName = Rhino.TextObjectText(strObject) + ".dxf" End If Next If IsNull(strFileName) Then Exit Sub End If strPathName = Rhino.DocumentPath() + "\" + strFileName ' runs the export using the file name/path and your settings Call Rhino.Command("-_Export " & chr(34) & strPathName & chr(34) & " Scheme Default Enter", True) End If
Also, I do not want to have to press Enter to finish the selection. Is there a way to disable that?