sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Renaming Materials in batch?

    Scheduled Pinned Locked Moved SketchUp Discussions
    2 Posts 2 Posters 9 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      maomao000
      last edited by

      Hi, is there someone can tell me how to rename all the materials at once with the skp file names? Million thanks!

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        mod=Sketchup.active_model
        mas=mod.materials
        nam=mod.name
        nam='Untitled' if nam==''
        mod.start_operation('mat-renamer', true)
          mas.each{|m| m.name=nam+'-'+m.display_name }
        mod.commit_operation
        

        Should do it pasted into the Ruby Console - one step undo-able...

        TIG

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement