Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Customizing Export Options

Customizing Export Options

theeastcoastwest
Participant Participant
778 Views
3 Replies
Message 1 of 4

Customizing Export Options

theeastcoastwest
Participant
Participant

I'm trying to configure custom export settings directly through Maxscript and can't seem to understand how to apply them.

  

So far, I'm doing this:

 

 

-- Get INI Object
theINI = objexp.getIniName()

-- Edit INI Geometry -> FlipZyAxis Setting setIniSetting theINI "Geometry" "FlipZyAxis" "0" -- Select Objects to be Exported select $mySceneObject -- Export file exportFile "export.obj" #noPrompt selectedOnly:true using:theINI

 

I question my use of the "using:theINI" settings argument, though omitting it produces the same result, as does my using the "using:ObjExp" convention.

 

I've very little experience with Maxscript, but was unable to find much help in the documentation.

 

I've read this post: https://forums.autodesk.com/t5/3ds-max-forum/possible-to-rename-custom-export-settings/m-p/7062507#M...

 

I realize that manually-updating the .ini file(s) relevant to this operation would be a fix, but that's not ideal for my use. 

 

My goal is to open a file, configure the objexp settings, and have the selected model exported using those settings. An alternative, which I also could find no documentation on, would be to load a custom .ini file and settings found there for the export.

 

Anyone have any experience with this?

0 Likes
Accepted solutions (1)
779 Views
3 Replies
Replies (3)
Message 2 of 4

drew_avis
Autodesk
Autodesk
Accepted solution

Hello, so I think the first problem is that the using: parameter expects an export filter, not the ini file.  So your code should be something like:

 

-- Export file
exportFile "export.obj" #noPrompt selectedOnly:true using:objExp

 

Also, the first time I tried setting the ini, it had not yet been created, so you might want to test and create it before you call the setIniSetting method.

 

Hope that helps,

Drew



Drew Avis
Content Experience Designer
Message 3 of 4

theeastcoastwest
Participant
Participant

Drew,


I'm checking the local .ini file and it does seem that it's updating when settings are changed via MaxScript.

 

Turns out the problem was that I was specifying a preset to be loaded as such:

 

setIniSetting theINI "General" "Preset" "Blender"

 

I changed that value to "" and everything works fine! Silly mistake it would seem.

 

Thanks for the help.

0 Likes
Message 4 of 4

drew_avis
Autodesk
Autodesk

Glad you were able to resolve it, and thank you for posting your solution, as that may help others with similar problems.

 

Drew



Drew Avis
Content Experience Designer
0 Likes