that does seem to work
if you want a persistent reference you can add an xattr to the active model file...
def only_iff
model = Sketchup.active_model
modName = Sketchup.active_model.title
modPath = Sketchup.active_model.path
modEntID = Sketchup.active_model.definitions.entityID
case
when modName.to_a.length == 1 then
remove_old = %x(xattr -d test "#{modPath}" 2>&1) if (%x(xattr -p test "#{modPath}" 2>&1)).length > 0
perSistent = %x(xattr -w test "#{modEntID}" "#{modPath}" 2>&1)
puts modEntID # but could be any persistent reference
when modName.to_a.length == 0 then
Sketchup.send_action('saveDocument;')
UI.messagebox "Save model and retry"
end #case
end # def only_iff
then in another session you can check if it's been thru your mill before.
modPath = Sketchup.active_model.path
%x(xattr -p test "#{modPath}" )
just thoughts
john