By request of a colleague of mine - he needed to do a search and replace on all Text entities in a model. He had found a plugin that did a search and replace and some more functions - but I only searched the selection or active entities.
This was a quick bash-up of a script to do the job.
Plugins -> Text Tools -> Search and Replace…
[Plugin] Text Tools
5 posts
• Page 1 of 1
[Plugin] Text ToolsLast edited by thomthom on Thu Nov 28, 2013 11:46 pm, edited 1 time in total.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: [Plugin] Text Tools (0.1.0) — 9 July 2009Didier Bur did a similar tool some time ago... find_and_replace_text.rb ? In a selection or globally in model...
TIG
Re: [Plugin] Text Tools (0.1.0) — 9 July 2009
That might have been the script my colleague tried to use.., but it only searched active_entities. Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: [Plugin] Text Tools (0.1.0) — 9 July 2009active_entities are the entities in the current edit of the model, group or definition, so that's equivalent to model.entities if it's in the model. It didn't mine into definitions...
That gets me thinking of another method - see below... simply filter the array of entities returned for text and change each bit of text to suit - works in the model, inside groups and components etc... useful for any methods where global change of some types of entities is needed - like layer and material manipulation when model is heavily grouped or componentized ?
TIG
Re: [Plugin] Text Tools (0.1.0) — 9 July 2009We've got such a method in the SKX library.
That reminds me; I've been meaning to get a first release for SKX out for the stable methods we got. Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
5 posts
• Page 1 of 1
|