Silent Execution

I’m using a slightly modified version of for a mass fbx export but have to hold down enter for a minute while it exports. Silly. Is there a reason the “-” flag on Export wouldn’t work?

Snippet with the rhino command

If IsArray(arrSelected) Then
			' Generate a modified path string
			' that includes the layer name
			strFile = strPath
			strFile = Replace(strFile, ".3dm", "_" & strLayer & ".fbx")
			' strFile = strLayer & ".fbx"
			' Export the selected objects
			Rhino.Command "_-Export " & strFile, 0
		End If

Over here looks like -Export version of FBX has 2 more prompts with FBX-specific command-line options.

So I guess for the script to work you would need to change the Rhino.Command code line into:
Rhino.Command "_-Export " & strFile &" _Enter _Enter", 0
or, to avoid problems with file paths containing ‘spaces’:
Rhino.Command "_-Export " & chr(34) & strFile & chr(34) &" _Enter _Enter", 0

does it change anything ?


1 Like

It executes silently but isn’t saving anything out. I’m looking at it and don’t see anything obvious

try removing ‘0’ (NoEcho) from Rhino.Command and see what the command history reports. Maybe it will give you some clues.

Save file name ( Version=5 SaveSmall=No GeometryOnly=No SaveTextures=No SavePlugInData=Yes Browse ): "“C:\Temp\temp2_3_ANNO.fbx”"
Directory “C:\Temp\Greer DWG"C:\Temp” does not exist

Uhh. the file is C:\Temp\Temp2.3dm and the Layer 3_ANNO

Not sure where it’s getting GreerDWG that was the last place it was run.

Rhino.Command “_-Export " & strFile &” _Enter _Enter", 0 is the trick. There were already quotes around strFile so doubling up didn’t work. Thanks Jarek for your help!

Great, glad you got it to work.