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.
    • M Offline
      MartinRinehart
      last edited by

      @edson said:

      i created some scenes and tried it with your file. it worked. your file has 3.8 Mb, mine have all more than 30Mb.

      Thanks!

      I am not understanding this. The VisMap Ruby code is getting an error. It collects an array of layer names, an array of scene names and a string with one "V" or "I" for each scene/layer intersection. That is a very small amount of data, even for your 30MB+ models. Hmmmm.

      
      # /models/rubies/t.rb
      
      require 'sketchup'
      
      model = Sketchup.active_model
      layers = model.layers
      scenes = model.pages
      
      puts
      puts 'This model has ' + (layers.length).to_s + ' layers and ' + (scenes.count).to_s + ' scenes.'
      i = 0
      scenes.each do |s|
      	puts
      	puts
      	puts 'Processing scene ' + (s.name).to_s
      	if s.layers.length > 0
      		puts 'Invisible layers in ' + (s.name).to_s + ' are;'
      		s.layers.each do |l|
      			print l.name + ', '
      		end
      	else
      		puts (s.name).to_s + ' has no invisible layers.'
      	end
      	puts
      end
      
      

      Above is a little reporter that lists each scene in a model and the layers within that scene that are invisible. Try it on my small model to make sure it works. Select All here, copy to clipboard, paste into editor, save to any convenient directory as "t.rb". With small model open in SU, open the Ruby Console window. In the white input line enter:

      load '/where/you/chose/t.rb'

      and press Enter. You should get a report. (Expand the Ruby Console a lot to view it.)

      Assuming that works, load one of your models into SU. In Ruby Console, up arrow, then Enter. That will start the report on your model. (Good time here to get a fresh cup of coffee.) It will run successfully, to completion of your last scene, or it will crash. I want it to crash, and I want to see the error message.

      If runs to completion, please ZIP up and send me a copy of enough of one of your models to reliably refuse to VisMap. MartinRinehart at gmail dot com. And thanks again.

      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 followed your instructions but the result was different from what you describe above. there was not a long report nor did sketchup crash. all i got is what you can see below.


        vismap1001.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:

          all i got is what you can see below.

          Odd. That error comes when the code says "if foo < bar" but "foo" is nil (doesn't exist). Then it's a traceback showing that the error is in "ldd_remake_labels" which was called by "addObservers" which was called by ... Those numbers are line numbers where the functions are found in the source file.

          All of which is to say that you somehow ran some Ruby entirely other than the wee bit in my post.

          Did I say SketchUp would crash? Didn't mean it. The little report-writing Ruby would crash as per your example, but with a line number in the 0 to 20 area.

          Could you try it again, using some other directory and/or name? Thanks again.

          Edit: Another possibility. My line "require 'sketchup'" loads the "sketchup.rb" library. That crash could be coming from deep in that library. Make sure you have a model loaded that VisMaps successfully before you try again.

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

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

            Martin,

            the 'true' means your script loaded successfully, twice, but... where did the output go?

            ldd_ is LEDAS Driving Dimensions plugin. I'll pm Dmitry and see if he can take a look here and see what is happening.

            Hi

            1 Reply Last reply Reply Quote 0
            • D Offline
              Dmitry Ushakov
              last edited by

              Edson,

              Thank you for reporting this problem. Could you please say what else plugins do you use in SketchUp and how often this problem happens?

              Sincerely yours,
              Dmitry Ushakov
              Director of Product Management
              LEDAS Ltd.

              http://www.DrivingDimensions.com - parametric plugins for SketchUp and Rhino

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

                @dmitry ushakov said:

                Edson,

                Thank you for reporting this problem. Could you please say what else plugins do you use in SketchUp and how often this problem happens?

                dmitry,
                i use a huge number of plugins. if you want i can make screen shots of my folder. this problem never ocurred before. it only came up when i ran the file martin asked me to.

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

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

                  @dmitry ushakov said:

                  Thank you for reporting this problem.

                  Dmitry,

                  Edson is unable to run my VisMap Ruby on some large models. I wrote a 20-line reporter that, I hoped, would help find the problem. Edson copied my little bit of code into "t.rb" on his machine and loaded it in the Ruby Console.

                  At least that was the plan. That's what Edson's screenshot shows. Somehow, your LEDAS Driving Dimensions plugin was triggered, instead of the little reporter. Any idea how LDD could have been triggered?

                  Martin

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

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    Dmitry Ushakov
                    last edited by

                    Edson, Martin,

                    Thank you for these explanation. The reason of the bug seems to be clear - our plugin tries to update a model, but fails since the model contains some corrupted piece of data (not surprising, since Edson uses "a huge number of plugins"). We are going to fix this behavior in the forthcoming version of our LDD plugin by checking the correctness of our data before updating a model.

                    However, I have to ask another question: when exactly the problem happens? When you open a model or when you load 't.rb' in the Ruby console?

                    Sincerely yours,
                    Dmitry Ushakov
                    Director of Product Management
                    LEDAS Ltd.

                    http://www.DrivingDimensions.com - parametric plugins for SketchUp and Rhino

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

                      @dmitry ushakov said:

                      However, I have to ask another question: when exactly the problem happens? When you open a model or when you load 't.rb' in the Ruby console?

                      only when I load 't.rb' in the Ruby console.

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

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        Dmitry Ushakov
                        last edited by

                        Edson, please try the newest version (1.2) of our Driving Dimensions plugin.
                        Your problem should be fixed, since we have resolved several compatibility issues.
                        You can download it here.

                        Sincerely yours,
                        Dmitry Ushakov
                        Director of Product Management
                        LEDAS Ltd.

                        http://www.DrivingDimensions.com - parametric plugins for SketchUp and Rhino

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

                          @dmitry ushakov said:

                          Edson, please try the newest version (1.2) of our Driving Dimensions plugin.
                          Your problem should be fixed, since we have resolved several compatibility issues.
                          You can download it here.

                          thanks, dmitry. i downloaded 1.2 30s ago... i will let you know how it goes.

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

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

                            just tried to run vismap after having updated the driving dimensions plugin. there was an error but it does not seem to be related to DD.


                            vismap_NOV25.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:

                              just tried to run vismap after having updated the driving dimensions plugin. there was an error but it does not seem to be related to DD.

                              That is VisMap doing exactly what it is supposed to do: reporting that your model has an error. It is trying to loop through something (the "each" method) that doesn't exist.

                              Can you send me the model? (Too big? Break into pieces. Send pieces. I'll rebuild.)

                              Thanks!

                              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 have sent you a model via yousendit. however, it is hard to believe all my models have problems. i tried vismap on more than 10 with the same result. i am inclined to think vismap has difficulties to handle large models.

                                regards,

                                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:

                                  martin,
                                  i have sent you a model via yousendit.

                                  Don't know that service. Do I have to contact someone?

                                  @edson said:

                                  it is hard to believe all my models have problems.

                                  Your workflow: do you start every model fresh, or do you grab pieces of existing models to create new?

                                  Either way, with a problem model in hand, it shouldn't take long to fix the model or VisMap. Look forward to it.

                                  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:

                                    @edson said:

                                    martin,
                                    i have sent you a model via yousendit.

                                    Don't know that service. Do I have to contact someone?

                                    Your workflow: do you start every model fresh, or do you grab pieces of existing models to create new?

                                    martin,

                                    you do not have to do anything. you will receive an email with a link to download the file.

                                    i start my models from zero but along the way i may import pieces from others.

                                    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:

                                      you do not have to do anything. you will receive an email with a link to download the file.

                                      Nothing yet, Edson. Gmail allows messages (including attachments) up to 25MB. Zip with maximum compression reduced a model I tested by 60%. Can you Zip a model and email it to me? MartinRinehart at gmail dot com.

                                      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:

                                        Nothing yet, Edson. Gmail allows messages (including attachments) up to 25MB. Zip with maximum compression reduced a model I tested by 60%. Can you Zip a model and email it to me? MartinRinehart at gmail dot com.

                                        very strange, martin. i sent you the skippie on november 26th. could you check the image below to make sure i addressed it correctly? anyway, i am uploading the file to 4shared and will send you the link shortly.


                                        Picture 18.png

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

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

                                          In gmail, that email probably went to your spam folder.

                                          Hi

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

                                            @edson said:

                                            very strange, martin. i sent you the skippie on november 26th. could you check the image below to make sure i addressed it correctly? anyway, i am uploading the file to 4shared and will send you the link shortly.

                                            Rinehart

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

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

                                            Advertisement