sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Renaming Materials in batch?

    Scheduled Pinned Locked Moved SketchUp Discussions
    2 Posts 2 Posters 33 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