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

    GetViewInfo

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 520 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.
    • N Offline
      N Lindenthal
      last edited by

      GetViewInfo

      SU6:
      Wie kann ich in SU6 von einer eingestellten bestimmten Sicht folgende Parameter ermitteln:

      SU6:
      How can I get the following parameter:

      Latitude
      Longitude
      Hight
      Distance
      Tilt
      Azimuth

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        Hello,

        Look at the ShadowInfo object:

        http://download.sketchup.com/OnlineDoc/gsu6_ruby/Docs/ruby-shadowinfo.html

        Some of the values may need calculated from what is available:

        
        Sketchup.active_model.shadow_info.keys
        ["City", "Country", "Dark", "DayOfYear", "DaylightSavings", "DisplayNorth", "DisplayOnAllFaces", "DisplayOnGroundPlane", "DisplayShadows", "EdgesCastShadows", "Latitude", "Light", "Longitude", "NorthAngle", "ShadowTime", "ShadowTime_time_t", "SunDirection", "SunRise", "SunRise_time_t", "SunSet", "SunSet_time_t", "TZOffset", "UseSunForAllShading"]
        
        
        
        latitude = Sketchup.active_model.shadow_info["Latitude"]
        
        

        Hi

        1 Reply Last reply Reply Quote 0
        • N Offline
          N Lindenthal
          last edited by

          Thanks, Jim.

          set konsolenText to "DayOfYear = Sketchup.active_model.shadow_info[\"DayOfYear\" ]"
          
          tell application "SketchUp"
          	activate
          	tell application "System Events"
          		tell process "SketchUp" --stellt im Konsolentextfeld die Einfügemarke sicher
          			tell menu bar 1
          				tell menu bar item "Fenster"
          					tell menu 1
          						click menu item "Ruby-Konsole"
          					end tell
          				end tell
          			end tell
          		end tell
          		keystroke konsolenText --to "AXTextFiled" of "Ruby-Konsole"		keystroke return
          	end tell
          end tell
          
          

          Because I start an AppleScript script from FileMaker, I need not to type in ruby console.
          With ruby script above I get
          162 (when the date of shadow is 06/11)
          163 (when the date of shadow is 06/12)

          But for Longitide, Latitude I got no different values, if I turn or go some steps, but only 10 and 50 (my location).

          So my question, how I can set the parameter of my view to get back a view of remember, stays here.

          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