I'm using Bash under Window to dynamically generate a ruby script. This script allow me to import a specific KML file in sketchup and when the import is done I would like to export my model to KMZ file. This is an extract of my ruby script
#----------------------------------------------------------
# Impport du modèle KML.
model = Sketchup.active_model
status = model.import inKML, false
if status
#----------------------------------------------------------
# Suppression du modèle KML importé.
#File.delete( inKML )
#----------------------------------------------------------
# Export du modèle au format KMZ.
modelFile=File.basename( inKML, ".kml" )
exportPath = exportDir + modelFile + ".kmz"
model.export exportPath
model.entities.clear!
#Sketchup.undo
#Sketchup.app_safe_shutdown
end
But the import KML plugin seems to give back the control to my script while importing, so the exported KMZ is not complete because the KML is not completely imported.
Any idea about this problem ?