sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Detect if SU was started with a template or a model

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 82 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • daikuD Offline
      daiku
      last edited by

      I want to execute a script (create a title block) if SU was started without a model loaded. Is there a way in ruby to detect that?

      Clark Bremer
      http://www.northernlightstimberframing.com

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        Perhaps
        Sketchup.active_model.path.empty? is true
        if it's an unsaved SKP and then
        Sketchup.active_model.modified? is true
        if it's been changed at all...
        😕

        TIG

        1 Reply Last reply Reply Quote 0
        • daikuD Offline
          daiku
          last edited by

          Worked Perfectly. Thanks, Tig!

          Clark Bremer
          http://www.northernlightstimberframing.com

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement