OnSave layout

Hi everyone. Is there a method to capture onSave Layout? Or do you know how can I do it?
Thanks!

Can you elaborate a bit more what you mean?

In the same way this exists:

def onSaveModel(model)
  puts "onSaveModel: #{model}"
end

I want to know if there is a function to capture the save event in the Layout.
I understand that the previous function :arrow_up: it just works for Sketchup context.

Without having tested this specific case, I believe the LayOut API is designed to be used (at the moment) only in SketchUp and only programmatically.

While a ModelObserver on the SketchUp model catches “save” events when the user (through the GUI) or any script saves the model to a file, the user usually does not save the LayOut document through the GUI. If your script is the only script editing a LayOut file (in SketchUp), it knows when it saves the LayOut file programmatically and does not need to be notified. (Does that make sense?)

2 Likes

Can you provide some context for why you’d want such event?