Hi all
I have one requirement in sketchup 8
When i am importing an image in sketchup 8, it ask me to choose 2 points for placing and scaling the image.
My requirement is after choosing an image for importing into model, i need to put it at default position instead of asking user choose picking points.
How can i do it in sketchup API ?
Thanks for your helping.
Use Entities.add_image
: http://www.sketchup.com/intl/en/developer/docs/ourdoc/entities.php#add_image
The second argument dictates where it should be positioned. If you need to rotate it, transform it afterwards.
model = Sketchup.active_model
entities = model.active_entities
point = Geom::Point3d.new(10, 20, 30)
image = entities.add_image("Shapes.jpg", point, 300)