sketchucation logo sketchucation
    • Login
    1. Home
    2. stanDM
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    S
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Import DAE, place it to center and save SKP

      Hi TIG,

      sorry for the late reply - I have been busy finishing another project project. I have just tested your code and it works perfectly! Thank you million times!

      Best regards,

      Stan

      posted in Developers' Forum
      S
      stanDM
    • Import DAE, place it to center and save SKP

      Hi guys,

      I am familiar with Python in C4D, but I was asked to do a small script for SketchUp, so I have to fight with Ruby and SketchUp itself 😄 So I apologize for some newbie questions:

      I need to batch import DAE files and save it to SKP. I have found some sample scripts around here, so batch import is working fine. But after import, object does not get placed in scene, but I can find it in compoments.

      
      if file_ext==".dae"
          newFilePath = f + "/" + file_name + ".skp"
          Sketchup.active_model.import(File.join(f,d),false)
          Sketchup.active_model.save(newFilePath)
          entities.clear!
        end
      
      

      Q1: Sketchup.active_model.save saves empty scene, which is expected, because model is not in the scene. Is there any way to place imported object to world center, make object active and save the scene?

      Q2: upon import of DAE, can I change info of the component - like its name and description?

      Thank a lot for your help.

      Stan

      posted in Developers' Forum
      S
      stanDM
    • 1 / 1