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

    [Plugin] VisMap - Layer/Scene Visibility Map

    Scheduled Pinned Locked Moved Plugins
    126 Posts 15 Posters 50.3k Views 15 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.
    • EdsonE Offline
      Edson
      last edited by

      please let us know when you post a modified version.

      edson mahfuz, architect| porto alegre • brasil
      http://www.mahfuz.arq.br

      1 Reply Last reply Reply Quote 0
      • M Offline
        markozeta
        last edited by

        @martinrinehart said:

        @markozeta said:

        Also another request for those with complex models is the ability to use freeze panes on the scene list and layer list.

        Freeze panes? What is a freeze pane?

        Martin

        Since your a Linux man, I'll quote you the OpenOffice version instead of the excel version:

        Link Preview Image
        InPics Solutions - Free computer tutorials

        Free computer tutorials

        favicon

        In Pics Computer Tutorials (inpics.net)

        😉

        It would help a ton, but most code that you could drop into your javascript routine would try to freeze the top and side, when you want the two sides to be frozen.

        BSME - Cal Poly Pomona
        Sketchup Pipe Maniac

        1 Reply Last reply Reply Quote 0
        • M Offline
          MartinRinehart
          last edited by

          @edson said:

          please let us know when you post a modified version.

          There is a new version now fixing a Mac issue. The strange "backwards UI" thing should now be gone.

          Does this have any effect on Edson's "no UI" issue? I doubt it, but you never know.

          Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

          1 Reply Last reply Reply Quote 0
          • EdsonE Offline
            Edson
            last edited by

            @martinrinehart said:

            Does this have any effect on Edson's "no UI" issue? I doubt it, but you never know.

            i am afraid there has been no change: still no UI.

            edson mahfuz, architect| porto alegre • brasil
            http://www.mahfuz.arq.br

            1 Reply Last reply Reply Quote 0
            • M Offline
              MartinRinehart
              last edited by

              @markozeta said:

              Naming your scenes BM6.2 or MS4.8 (Which is the official name) ... will kill the program.

              I changed "ground_floor" and "second_floor" to "ground.floor" and "second.floor" without problem. Can you post a file? Thx.

              Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

              1 Reply Last reply Reply Quote 0
              • M Offline
                markozeta
                last edited by

                Martin,

                The issue seems to be size. I could give you the model, but it's too large for these forums to post! However, as I was trying to reduce the size of the model in order to post it, when it got under 3.4 MB or so, the script worked!

                The bug seems to be not in getting data, but in sending it back to the model. When I do that, I get a prompt asking me if I want to continue running scripts.

                This prompt states "Error at Line 78, Char 4" of the script, and the error given was "The data area passed to a system call is too small."

                Could this be an overflow error of some type?

                Edit: I have 50 layers and 43 scenes, if that helps. That's a total of 2,150 check points. When deleting to fit to size, I also "purged unused", and then it worked.

                Mark

                BSME - Cal Poly Pomona
                Sketchup Pipe Maniac

                1 Reply Last reply Reply Quote 0
                • M Offline
                  MartinRinehart
                  last edited by

                  @markozeta said:

                  Martin,

                  "Error at Line 78, Char 4" of the script, and the error given was "The data area passed to a system call is too small."

                  Could this be an overflow error of some type?

                  Edit: I have 50 layers and 43 scenes, if that helps. That's a total of 2,150 check points.

                  Thanks for your help!

                  Line 78, char 4 is the middle of a variable name. MSIE's error reporting is very near to totally worthless. It has to be SketchUp passing data to a system call, so this is a SketchUp bug. (Remember that numbers like 50, 43 and 2150 are very small numbers - though the VisMap you get probably looks huge.)

                  Today I am going to try to get good with one or the other of Ruby's alternative exception handlers and see if I can get enough information to pass back to the JavaScript so you get an error message that might be helpful.

                  Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    MartinRinehart
                    last edited by

                    @markozeta said:

                    [Freeze panes] would help a ton, but most code that you could drop into your javascript routine would try to freeze the top and side, when you want the two sides to be frozen.

                    OK. I'm up to speed on freeze panes. What exactly is your design?

                    Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      MartinRinehart
                      last edited by

                      I just ULd new Ruby and JavaScript.

                      The Ruby now traps errors in the bit of the code where I think they might happen, passes the error message on to the JavaScript. In turn, the JS uses the error message to create an error report where you were expecting the VisMap UI.

                      If my guess is right about the source of the trouble, there should be no more blank UIs.

                      Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

                      1 Reply Last reply Reply Quote 0
                      • EdsonE Offline
                        Edson
                        last edited by

                        martin,
                        there has been some improvement: the UI is no longer blank, as you can see, but it does not get any data from the model. i have 24 scenes and about 40 layers in this model. i am on mac (10.5.8/SU 7)


                        VisMap0911.png

                        edson mahfuz, architect| porto alegre • brasil
                        http://www.mahfuz.arq.br

                        1 Reply Last reply Reply Quote 0
                        • M Offline
                          MartinRinehart
                          last edited by

                          @edson said:

                          there has been some improvement: the UI is no longer blank

                          Beautiful!

                          First, I see that your scene list is on the wrong side. I can fix that. (Edit: done.) Second, it appears that there was an issue with your scene list, as it appears to have broken before/during the scene name collection process. I'll cast a wider net for breaks and see if I can get you a genuine error message. (Edit 2: also done.)

                          (It's rained all day. The U.S. Open is closed.)

                          Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

                          1 Reply Last reply Reply Quote 0
                          • EdsonE Offline
                            Edson
                            last edited by

                            martin,

                            i downloaded the plugin again but not only there was no improvement as we are back to the blank UI. keep trying.

                            edson mahfuz, architect| porto alegre • brasil
                            http://www.mahfuz.arq.br

                            1 Reply Last reply Reply Quote 0
                            • M Offline
                              markozeta
                              last edited by

                              Aha! It is a bug with overflow.

                              http://www.boutell.com/newfaq/misc/urllength.html states that IE can only have a URL of length 2,083 chars.

                              Line 78 to 82 of vismap.js states...

                              
                              function rubyCalled( callback_name, message ) {
                              	if ( (typeof message) == 'undefined' ) message = '';
                              	url = 'skp;' + callback_name + '@' + message;
                                	window.location.href = url;
                              }
                              
                              

                              With my example, this would request a url from internet explorer that would contain a 2,150 character string attached to an 11 character header to form a 2,161 character url - which exceeds IE's ( 🤢 ) limits.

                              I guess the only way I could suggest fixing this is with a conversion of binary (1 for V, 0 for I), converted to ASCII, and then back on the ruby side. Ruby will be able to unpack it though, using str.unpack in ruby, but still, this will be difficult to overcome.

                              .>

                              Not much help, sorry. 😳

                              BSME - Cal Poly Pomona
                              Sketchup Pipe Maniac

                              1 Reply Last reply Reply Quote 0
                              • M Offline
                                MartinRinehart
                                last edited by

                                @edson said:

                                not only there was no improvement as we are back to the blank UI. keep trying.

                                This is not good. I wish I were in front of your computer. Hmmmm.

                                Right now I believe the smart thing is to sleep on it.

                                Do you know anything about Ruby or JavaScript?

                                Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

                                1 Reply Last reply Reply Quote 0
                                • M Offline
                                  MartinRinehart
                                  last edited by

                                  @markozeta said:

                                  this would request a url from internet explorer that would contain a 2,150 character string attached to an 11 character header to form a 2,161 character url - which exceeds IE's ( 🤢 ) limits.

                                  Thanks!

                                  I've done a lot with bit maps, so packing 16k bits into a 2k string is not a problem. But is 16k going to handle really large animations? Or should I find (they're there) a more capacious solution?

                                  Edit: "The data area passed to a system call is too small." Remember? That's the 2k data area that IE is trying to fit 2k+ bytes into.

                                  Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

                                  1 Reply Last reply Reply Quote 0
                                  • EdsonE Offline
                                    Edson
                                    last edited by

                                    @martinrinehart said:

                                    Do you know anything about Ruby or JavaScript?

                                    very little. however, i have been able to run tests for other coders when there was any problem about running scripts on mac. but i would have to be guided for that to work.

                                    edson mahfuz, architect| porto alegre • brasil
                                    http://www.mahfuz.arq.br

                                    1 Reply Last reply Reply Quote 0
                                    • M Offline
                                      MartinRinehart
                                      last edited by

                                      Edson,

                                      Two attachments. "house.skp" is my test model. Try to VisMap it. If it works, then it's your models. Please send me the smallest one on which VisMap fails. Ignore the second file.

                                      Leave "house.skp" loaded in SU if the above fails. "vismap.txt", which you must rename to "vismap.js", is the JavaScript but it is tricked out to not call the Ruby. Instead, it simulates the Ruby return of data appropriate to "house.skp". Save it to /dir/of/your/su/Plugins/vismap/ as "vismap.js" (UL'd as "vismap.txt" because this board won't permit ".js" files.) If it succeeds, then we have a problem in the Ruby code. If it fails, then we have a problem with the JavaScript. Let me know.

                                      Martin


                                      test model


                                      tricked out JavaScript

                                      Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

                                      1 Reply Last reply Reply Quote 0
                                      • EdsonE Offline
                                        Edson
                                        last edited by

                                        martin,

                                        i opened your model and the vismap UI was still blank. then i did as you asked me to: downloaded the other file, renamed it and put it in the proper folder. it worked: the UI appeared with the info related to house.skp. however, it did not work with any of my models. closing and opening the vismap window again while in your file works but it takes along for the info to appear.

                                        do you want me to send you my model?

                                        edson mahfuz, architect| porto alegre • brasil
                                        http://www.mahfuz.arq.br

                                        1 Reply Last reply Reply Quote 0
                                        • M Offline
                                          MartinRinehart
                                          last edited by

                                          @edson said:

                                          do you want me to send you my model?

                                          I don't think so. The fact that you couldn't VisMap my model but you could VisMap with the tricked out JavaScript pretty much isolates the Ruby code as the villain. Ruby has a good reputation for being truly multi-platform. (Unlike JavaScript, where MSFT resolutely refuses to follow standards.)

                                          Hmmmm.

                                          Off topic: Speaking of things I don't know, where is Brazil in world tennis? I would have expected a wave to follow Kuerten.

                                          On topic: Hmmmm. I'll think of something. (I hope.)

                                          Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

                                          1 Reply Last reply Reply Quote 0
                                          • takesh hT Offline
                                            takesh h
                                            last edited by

                                            Hi Martin,
                                            Since I was having the blank dialog box problem too (in my case, I had to go to another program once and come back to SU to get Vismap display right), I tried the above house.skp and vismap.js files.
                                            with house.skp, vismap showed a small blank dialog box first, so I dragged its edge to maxmize it and the content of the box appeared.
                                            So I installed vismap.js. With it, vismap showed dialog box right, although it was small at the beginning.
                                            Then funny things started happening. I opened several of my own models and tried vismap, but it kept showing the layer structure of house.skp! Now this is weird.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 2 / 7
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement