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!
    πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Display Section Cuts

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 3 Posters 325 Views 3 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.
    • G Offline
      GWD
      last edited by

      Is there a way to control the 'Display Section Cuts' with ruby?

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        I looked thru the SU Registry settings and it is not there.

        We would expect these settings to be kept in the model's and page's RenderingOptions hash, but I dont see it there either.

        PC ONLY:

        Toggle "Display Section Planes"
        Sketchup.send_action(21347)

        Toggle "Display Section Cuts"
        Sketchup.send_action(21348)

        These are equivalent to telling the Windows API to perform the default action on the control (toolbar button in this case,) with the given Automation ID.

        For a query.. it might be possible to use a call thru Win32API class, to get the checked state of the button. (The toolbar window name is "Sections" for US-en, and it's Automation ID is 477.)

        Or, you might get the View menu object and check the checked states of the menu items, again via a Win32API call.

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • G Offline
          GWD
          last edited by

          @dan rathbun said:

          I looked thru the SU Registry settings and it is not there.

          We would expect these settings to be kept in the model's and page's RenderingOptions hash, but I dont see it there either.

          PC ONLY:

          Toggle "Display Section Planes"
          Sketchup.send_action(21347)

          Toggle "Display Section Cuts"
          Sketchup.send_action(21348)

          These are equivalent to telling the Windows API to perform the default action on the control (toolbar button in this case,) with the given Automation ID.

          For a query.. it might be possible to use a call thru Win32API class, to get the checked state of the button. (The toolbar window name is "Sections" for US-en, and it's Automation ID is 477.)

          Or, you might get the View menu object and check the checked states of the menu items, again via a Win32API call.

          Thanks Dan the toggle is good enough for me. But i read something that the send_action with a code doesn't work on the mac version. Do you know if this is correct?

          1 Reply Last reply Reply Quote 0
          • Dan RathbunD Offline
            Dan Rathbun
            last edited by

            @unknownuser said:

            But i read something that the send_action with a code doesn't work on the mac version. Do you know if this is correct?

            I believe that is correct because the platforms are built with different Automation IDs. (I'm not a Mac guy, but I think the Mac IDs are strings, rather than integers, as on Windows.)

            What we need is a cross-platform Sketchup.send_action() string, or these keys added to the RenderingOptions hash.

            I'm not here much anymore.

            1 Reply Last reply Reply Quote 0
            • G Offline
              GWD
              last edited by

              @dan rathbun said:

              @unknownuser said:

              But i read something that the send_action with a code doesn't work on the mac version. Do you know if this is correct?

              I believe that is correct because the platforms are built with different Automation IDs. (I'm not a Mac guy, but I think the Mac IDs are strings, rather than integers, as on Windows.)

              What we need is a cross-platform Sketchup.send_action() string, or these keys added to the RenderingOptions hash.

              I agree. What we need is that everything what you can do with SU is also supported in the API. I don't know why there are some parts that aren't supported (sectionplanes, Export 2D graphic (dxf), ...)

              1 Reply Last reply Reply Quote 0
              • thomthomT Offline
                thomthom
                last edited by

                @unknownuser said:

                I agree. What we need is that everything what you can do with SU is also supported in the API. I don't know why there are some parts that aren't supported (sectionplanes, Export 2D graphic (dxf), ...)

                Dimensions, several Material & Layer methods ... the list goes on... 😞

                Thomas Thomassen β€” SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund

                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