Automatically import multiple SKP files

444 views
Skip to first unread message

Govid

unread,
Aug 14, 2010, 12:33:48 PM8/14/10
to Google SketchUp Developers - SketchUp Ruby API
I am looking for a way to automatically import multiple .SKP files
(without having to make a mouse click for each file). Below is some
code that automatically imports multiple DWG files.

model = Sketchup.active_model
filename1 = 'C:\Components\file1.DWG'
filename2 = 'C:\Components\file2.DWG'
model.import filename1
model.import filename2

...but when I use the same code for SKP file names two things occur
1. Only the last SKP model (in the list of models) gets imported.
2. I have to place the SKP model with the mouse click.
(None of these two things occur when I import DWG files)

Any ideas of solutions to import the SKP files without having to make
a mouse click for each file?

Thanks,
Message has been deleted

Jim

unread,
Aug 14, 2010, 5:03:09 PM8/14/10
to Google SketchUp Developers - SketchUp Ruby API
I think you want to use DefinitionList.load to load the .skp files.

Govid

unread,
Aug 15, 2010, 2:53:32 AM8/15/10
to Google SketchUp Developers - SketchUp Ruby API
Yes, brilliant!
Thank you very much Jim!

Jim

unread,
Aug 15, 2010, 11:31:29 AM8/15/10
to Google SketchUp Developers - SketchUp Ruby API
On Aug 15, 2:53 am, Govid <joha...@gmail.com> wrote:
> Yes, brilliant!
> Thank you very much Jim!

Glad I could help.

Dhruv Seth

unread,
Oct 23, 2013, 5:58:41 PM10/23/13
to sketch...@googlegroups.com, joh...@gmail.com
Could you post the final result please.
Thanks

Suresh Babu

unread,
Oct 24, 2016, 8:13:43 AM10/24/16
to SketchUp Ruby API, joh...@gmail.com

how we can use definitionlist.load for importing multiple sketchup files


Please gie an example for that.

Thanks & Regards,
Suresh babu K
Reply all
Reply to author
Forward
0 new messages