Programmatic FBX Export Ignores extra flags?


I’m setting up a script to export FBX files in a certain way.
However, I am not able to replicate the behavior of manual clicks with the script.

The following python code snippet:

import Rhino
fbxPath = r"C:\Temp\TestAscii.fbx";
fbxOptions = “ExportFileAs=Version7Ascii ExportNurbsObjectsAs=Mesh YUp=Yes”;
script = ‘_-ExportWithOrigin 0,0,0 "’ + fbxPath + ‘" ’ + fbxOptions + ’ _Enter _Enter’;
Rhino.RhinoApp.RunScript(script, True);

Does not generate an FBX file in ASCII format. How come?

Hi @noamgat,

This works:

_-ExportWithOrigin 0 \users\dale\desktop\test.fbx _ExportNurbsObjectsAs=_Mesh YUp=_Yes _ExportFileAs=_Version7Ascii _Enter _Enter

You might check your string formatting and concatenation.

– Dale

What is the difference between )Mesh and Mesh (difference 1) and between Yes and _Yes (difference 2)?

The ) is a typo, that should have been _.

All the options and their values are prefixed with an underscore _.