Import PNG Image

In my opinion, I believe it is best if you become familiar with Ruby before you can apply the additions that the SketchUp API adds to the Ruby environment.


The simpliest way is to use this method:

Sketchup::Entites#add_image()

Try giving a valid URL for the path argument, to your remote file.

But be aware that some files types (with regard to certain operations) are edition or platform dependant (ie, Pro only, or Mac only.) Ref:
https://help.sketchup.com/en/article/3000153


Breaking down you desire a bit more:

You already found the Sketchup::Model#import() method.

In the API images are imported wrapped within a special component subclass.
This class has methods for setting it’s transformation, height, width, origin, etc.

1 Like