Auto Flat Text or Label  Topic is solved

Got an idea to improve SketchUp?

Auto Flat Text or Label

Postby pohlr1 » Wed May 23, 2018 7:14 pm

Is there a feature that automatically will label all my groups/components? I have looked and looked. See attachment for example.
0

pohlr1 
Premium Member
Premium Member
 

Re: Auto Flat Text or Label  Topic is solved

Postby sdmitch » Wed May 23, 2018 8:21 pm

Select groups.

Copy and paste the following code into the Ruby Console and press Enter.

Code: Select all
mod = Sketchup.active_model
ent = mod.active_entities
sel = mod.selection
sel.grep(Sketchup::Group).each{|g|
 pt = Geom::Point3d.linear_combination(0.5,g.bounds.corner(4),0.5,g.bounds.corner(7))
 ent.add_text(g.name,pt,[0,0,g.bounds.depth])
}
1
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: Auto Flat Text or Label

Postby pohlr1 » Fri Jul 27, 2018 2:20 am

sdmitch wrote:Select groups.

Copy and paste the following code into the Ruby Console and press Enter.

Code: Select all
mod = Sketchup.active_model
ent = mod.active_entities
sel = mod.selection
sel.grep(Sketchup::Group).each{|g|
 pt = Geom::Point3d.linear_combination(0.5,g.bounds.corner(4),0.5,g.bounds.corner(7))
 ent.add_text(g.name,pt,[0,0,g.bounds.depth])
}



Oh MAN! Sorry for the incredibly late reply on this. Thank you! Its crazy that sketchup doesnt have a bult in feature to do BOM with bubble callouts etc.
0

pohlr1 
Premium Member
Premium Member
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to SketchUp Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests

Visit our sponsors: