How do I launch Layout from Sketchup using win32ole?

I have tried using Sketchup.send_to_layout(filename) and/or Layout::Document.open(filename) and am able to obtain the object handles. However, these utilities don’t seem to automatically open Layout in order for me to view creation of the file(s) nor the changes that I’m attempting to do using the API Layout utilities.

Can this be done? If so, can you help me in pointing me in the right direction to resolve this problem?

Thanks,

Scott.

I haven’t used the Windows specific APIs very much and don’t how to that would be done. However I think the Ruby API’s UI.openURL method can be used to open any file in its default program, on all platforms.

1 Like

are you first ‘saving’ the model?

model = Sketchup.active_model
# change to windows path
filename = '/tmp/test.skp'
model.save(filename)
Sketchup.send_to_layout(filename)

john