export selected via maxscript

super simple question but I have no idea and don't found anything in max help.
I want export to obj selected objects from scene to file for specified name.Is it possible at all via maxscript?

The only thing I found is:
actionMan.executeAction 0 "40373" -- File: Export Selected
but there is no access to name, extension, etc.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kredka's picture

work

ok I found this

for anyone looking for exporting selected objects:

sceneName = maxFilePath + "objectName.obj"
exportfile sceneName #noPrompt selectedOnly:true

barigazy's picture
kredka's picture

thanks for link,I have seen

thanks for link,I have seen it already before your reply and like I said, there is nothing about exporting selected objects, I check it with noses:

sceneName = maxFilePath + "objectName.obj"
for o in selection do
(
saveNodes o sceneName
)

but don't work

barigazy's picture

...

You are making me angry.

-- to export selection to *.obj
if selection.count != 0 do
(
    theClasses = exporterPlugin.classes
    _objIdx = findItem theClasses ObjExp
	-- with *.OBJ export dialog
    exportFile (GetDir #scene + "/exportTest" ) selectedOnly:on using:theClasses[_objIdx]
	-- without *.OBJ export dialog
	--exportFile (GetDir #scene + "/exportTest" ) #noprompt selectedOnly:on using:theClasses[_objIdx]
)

barigazy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.