sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    โš ๏ธ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update

    Detect if SU was started with a template or a model

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 111 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