Google Sketchup中是否有命令行以3ds或fbx格式导出?

我正在寻找一种方法将一些skp,kmz或dae文件一次转换为3ds或fbx格式。在sketchup pro中你可以导出为... 3ds或fbx但是打开每个文件并导出它需要很长时间。 Sketchup中是否有命令行,或者可以使用脚本来自动执行此过程? 谢谢     
已邀请:
您需要从命令行调用sketchup来指定脚本 马上跑
sketchup.exe -RubyStartup d:scriptsrunexport.rb
在你的ruby脚本(
runexport.rb
)中你可以 加载你的模型。请参阅http://code.google.com/apis/sketchup/docs/ourdoc/model.html#import 导出你的模型。请参阅http://code.google.com/apis/sketchup/docs/ourdoc/model.html#export 最后,关闭sketchup。见http://forums.sketchucation.com/viewtopic.php?f=180&t=29162 对于递归遍历目录,请尝试使用此ruby代码(来自维基百科) 使用正则表达式匹配模式
#define a recursive function that will traverse the directory tree
def printAndDescend(pattern)
  #we keep track of the directories, to be used in the second, recursive part of this function
  directories=[]
  Dir['*'].sort.each do |name|
    if File.file?(name) and name[pattern]
      puts(File.expand_path(name))
    elsif File.directory?(name)
      directories << name
    end
  end
  directories.each do |name|
    #don't descend into . or .. on linux
    Dir.chdir(name){printAndDescend(pattern)} if !Dir.pwd[File.expand_path(name)]
  end
end
#print all ruby files
printAndDescend(/.+.rb$/)
    

要回复问题请先登录注册