• Login
sketchucation logo sketchucation
  • Login
⌛ Sale Ending | 30% Off Profile Builder 4 ends 30th September

Adding text clears Sketchup window

Scheduled Pinned Locked Moved Developers' Forum
6 Posts 3 Posters 298 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.
  • P Offline
    Pout
    last edited by 7 May 2010, 09:39

    Are there any known issues when adding a big amount of text to a model?
    The script i have automatically creates text for each entity.
    In smaller models this is no problem.
    In larger models, the text is added successfully but the Sketchup model window is empty in the end. All entities are still there, invisible, but they cannot be selected nor edited... (entities.length still give a result so the model is not empty)
    They are not hidden either.

    Could it have something to do with graphic card?

    1 Reply Last reply Reply Quote 0
    • T Offline
      thomthom
      last edited by 7 May 2010, 10:11

      @pout said:

      Could it have something to do with graphic card?

      Maybe...
      Have you tried without Hardware Acceleration?

      What card and version of drivers do you have?

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

      1 Reply Last reply Reply Quote 0
      • P Offline
        Pout
        last edited by 7 May 2010, 10:36

        Nvidia GeForce Go 7950 GTX (driver: 6.14.11.7948)

        Strange thing is , with the VolumeCalculator 2 (which also creates text, all goes well.

        1 Reply Last reply Reply Quote 0
        • P Offline
          Pout
          last edited by 7 May 2010, 12:13

          Ok, never mind, i did not get a bug splat or ruby error so i thought all was correct in the code.
          When a selection is empty and you execute this script:
          selected= Sketchup.active_model.selection
          selected.each { |e|
          }

          This apparantly does not throw an error.

          1 Reply Last reply Reply Quote 0
          • T Offline
            TIG Moderator
            last edited by 7 May 2010, 12:20

            If you are processing a selection or entities object as if it were an array it's often best to make it an array as changing it in the each loop/block can give unexpected results as the selection/entities list might change as a result of your code [e.g. erasing]
            so I'd use
            ss=model.selection
            and
            ssa=ss.to_a

            TIG

            1 Reply Last reply Reply Quote 0
            • P Offline
              Pout
              last edited by 7 May 2010, 12:36

              Tig,

              true, normally i always check if the array has any value or length>0

              What would be the best way to check if an array has values? I assume length is the way to go?

              
              test=[]
              if test==[] -->TRUE
              if test==nil --> FALSE
              if test.length<1 -->TRUE
              
              
              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                3/6
                Last post
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement