Looking to hire someone to create a SketchUp plugin

Looking through your posts, I think I misunderstood you quite a bit (rather a lot)..

My mother never spoke English to me.
Having worked for an international company for 25 years, I thought I understand the language of the kitchen, I understand the dialects and quite a few slang… but if someone speaks the language of the kitchen and slang with a dialect and typo… it can be a problem.

A raw translation does not reflect the actual meaning. I still need to improve on this! :blush:

Anyway, I already wrote what I wrote, even if I didn’t get what you meant at first…, I hope it will be useful to you or someone… :wink: :innocent:
:peace_symbol: :beers:

.:blush:

:slight_smile: If I make a joke and give a compliment but the joke isn’t good, just take the second part as my meaning :slight_smile:

*‘Aint’ aint word = ‘aint’ is not a word. :slight_smile: “Thang” = “Thing” :slight_smile: Usually if I speak like that, I inflect my voice so it’s more obvious that I’m kidding ;^)!.

But in this thread we’re supposed to be focused on a language you know well and I don’t… which is why I haven’t posted the code for the extension yet. I’ll get back to that now…

*Doesn’t have proper 2 spaced indentation:

3DxJFD/BatchRenameScenes (github.com)

1 Like

@VahePaulman Hi, chatgpt works great but it makes a few mistakes for which you need to have the knowledge of how Sketchup API works. I am a developer and use chatgpt a lot but for smaller modules and functions and it works great. If you still need to plugin to be made and it is just to rename scene I can do it for you. Just mention me and reply and I would know that you need my help.
I can also have a zoom meeting and teach you how to do it by using chat gpt, while creating the plugin in session.

Coming back to this old thread. I found that the s4u Export Scenes plugin (though not a batch renamer per se) vastly cut the time of naming scenes.

However, a side-topic arises from there:

I have over 60 scenes in a file, where I need to replace for example the B40 with B120.
So in a nutshell it’s a “find and replace” feature, that neither s4u nor @curic4su 's plugins have.

Is anyone aware of such a plugin?

Currently I am using the “Advanced Renamer” PC software and renaming my renderings in post. But the SKP files also need to be “clean” and error free, so a find-and-replace feature would really be the savior in this situation.

Note:
SketchUp (therefore, Ruby API either) does not keep track about the changes of the scenes or its properties. Therefore the text replacement what this snippet do, cannot be undone. (Ctrl+z, Alt+Backspace, undo button wont work.)
However using the opposite find-replace string pair can be appropriate.
I told you! Don’t be lazy to make a backup(s)!

Copy paste the code below to Ruby console and hit Enter. You will have a menu in Extension>“Find-Replace in Scene names”

Enter what you want to Find and Replace to into the popup.
All occurrences of the “Find:” string will be replaced to a “Replace to:” string in all scene names.

Does not really tested…
No warranties! Use at your own risk!

module Dezmo::FindReplaceinPageNames
  extend self
  
  def run
    prompt = ["Find:", "Replace to:"]
    defaults = ["", "" ]
    input = UI.inputbox(prompt, defaults, "Find&Replace in Scene names")
    return unless input
    rename_pages(*input)
  end
  
  def rename_pages(find, replace)
    model = Sketchup.active_model
    pages =  model.pages
    model.start_operation("Find&Replace in Scene names", true)

    pages.each do |page|
      page.name = page.name.gsub(find, replace)
    end

    model.commit_operation
  end
  
  unless defined?(@ui_loaded)
    UI.menu("Plugins").add_item("Find-Replace in Scene names") { run }
    @ui_loaded = true
  end
  
end

find-replace-scene

You can also install it with Extension Manager, if it works…and you like it.
Dezmo_find-replace_in_pagenames.rbz (501 Bytes)

4 Likes

Thank you so much for your time and the code @dezmo! :raised_hands:t2: :heart_eyes:
I’ll give it a try and let you know how it goes.

I do make backups! Trust me I’ve learned my lesson 11 years ago, while I was still in uni, when an architectural SKP file I was working on for 4 months became corrupted 1 week before deadline and I had no backups… :sweat_smile:

In this case however, it’ not a question of backups. The “B” from my screenshots stands for “Breite” (width in German). It’s a furniture unit with 4 different widths. We first modelled and finished the narrowest one and since it’s modular, we just duplicated the SKP and stretched the width accordingly. The difficulty rose from the scene names. The scenes have to be named precisely according to internal product code guidelines. We already named and rendered everything in the first SKP file, but since the second file contains a wider version, the B-attribute needs to be adjusted of course.

A backup copy would not help in this case. Looking forward to giving your code a try! Thank you again!