sketchucation logo sketchucation
    • Login
    1. Home
    2. Pout
    3. Posts
    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!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
    P
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 57
    • Posts 259
    • Groups 1

    Posts

    Recent Best Controversial
    • Adding text clears Sketchup window

      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?

      posted in Developers' Forum
      P
      Pout
    • RE: SketchUp RUBY API Wishlist [way of coding wishes, please]

      Here is my list:

      • Tig, although your solutions on material.name=, layer.delete, material.delete are good, it seems to me it would be much easier to just have them in the API. So i second the proposals of ThomThom

      • Also i second the proposal of Morisdov concerning the add_framechange_observer not firing when creating movies or when working in layout. It should fire there to.

      • make the entity.id consistent throughout different SU sessions (it changes now from time to time)

      • it would be great if you could just select an entity based on a parameter (eg. entity.id) without looping all the entities in the model

      • being able to access the font/size and other parameters of a text

      • make a difference between the execution of scripts and the interface so it is possible to incorporate a 'stop script' button for example. Now the interface freezes as long as scripts are running. This makes users believe the execution of the script has halted and Sketchup has stopped working.

      • ...more to come

      posted in Developers' Forum
      P
      Pout
    • RE: Developers wish list

      Great, not sticky? 😞

      posted in Developers' Forum
      P
      Pout
    • Developers wish list

      Is there a developers wish list topic?
      I remember there was one, but can't seem to find it

      posted in Developers' Forum
      P
      Pout
    • RE: Optimization Tips

      all works, speeds increase is fine πŸ˜„
      thx!

      posted in Developers' Forum
      P
      Pout
    • RE: [Code] layer.delete()

      Great thx Tig for the extra explanation

      Now if only this was possible for materials to (without having to duplicate the entities first)

      BTW Tig, do you know if is possible to refresh the Layer window?

      posted in Developers' Forum
      P
      Pout
    • RE: [Code] layer.delete()

      @thomthom said:

      @al hart said:

      Is there no way to delete a layer directly?

      Not via the API, erase! method for layers and materials are missing. There's also missing methods to edit names etc... 😞

      ThomThom,

      You can edit a layer name with layer.name=
      Although you will only see the changed layername when reopening the layer window.
      (I don't know however what is done with SU entities on that layer, since i only rename empty layers in my script)

      posted in Developers' Forum
      P
      Pout
    • RE: [Plugin] Volume Calculator2...

      Hey TIG,

      Thx for this script.

      I have a little question:

      Let's say a group only contains one or multiple faces not forming a volume (so volume can not be calculated)
      How do I build in a test that determines if the script should continue with the volume calculation (or just give the combined area of the faces)?
      Maybe the test is already in the code, but i can't seem to figure it out completely.

      regards

      posted in Plugins
      P
      Pout
    • RE: Duplicate of component definition

      Hey Chris,

      We are the developers of the 4D Virtual Builder for Sketchup plugin πŸ˜„
      Hope you already had the time to test-drive it.

      Since I'm not a native Ruby developer this forum has been a great help!

      posted in Developers' Forum
      P
      Pout
    • RE: Optimization Tips

      I'll check and let you know. When i use 'class' the correct conditions are entered but the result differs.
      I'll keep you posted if it changes with your scripts.

      Thx

      posted in Developers' Forum
      P
      Pout
    • RE: Optimization Tips

      concerning typename vs class:

      For, till now, unexplained reason when i change typename with class the results are different
      Script is a bit like this:

      x=entity.class (or entity.typename)
      if x=="Face"
      do something
      elsif x=="Group"
      do something
      elsif x=="ComponentInstance"
      do something
      else
      end
      

      When the type is "ComponentInstance" the results are not the same for class and typename.
      I need to check on this since the speed increase is huge

      posted in Developers' Forum
      P
      Pout
    • RE: Duplicate of component definition

      Checking some small bugs in our plugin.
      The smaller they are, the harder they are!

      posted in Developers' Forum
      P
      Pout
    • RE: Duplicate of component definition

      😳

      but thx , solution works perfectly, i was looking into this for half a day now and trying all kinds of things and the most simple one I didn't see

      posted in Developers' Forum
      P
      Pout
    • RE: Duplicate of component definition

      Like this?

      x=Sketchup.active_model.entities.add_instance(definitionname)
      x.make_unique
      x.definition.name="blabla"

      Then how do i delete the instance again so that i only have the new definition in the library?

      Thx Thomthom for the quick help

      posted in Developers' Forum
      P
      Pout
    • Duplicate of component definition

      Is there a good and easy way to make a copy of a component definition.
      I can not use make_unique since the component only has one instance.

      I could copy all the entities of the component into a new group and make that a component but then i have duplicate data in the model

      Thx!

      posted in Developers' Forum
      P
      Pout
    • RE: SU Ruby + XML

      Todd,

      Tll now i was using:

      xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
      xmlDoc.async="false";
      xmlDoc.onreadystatechange = readXML;
      xmlDoc.load(url);
      
      function readXML()
      {
         if(xmlDoc.readyState == 4)
         {
      	_extractxml();
      	}
      }
      

      for windows/IE, did work, but also show script time execution errors.
      Let's see if LoadXML is better

      Thanks for the links! Much appreciated

      posted in Developers' Forum
      P
      Pout
    • RE: Webdialog vs browser

      Thanks TBD! Clear answer.
      So i understand there is no difference for the browser version either (IE4-5-6-7-8 for example)

      posted in Developers' Forum
      P
      Pout
    • RE: SU Ruby + XML

      Hey ThomThom,

      Can you explain a bit more?
      Thx

      posted in Developers' Forum
      P
      Pout
    • Webdialog vs browser

      If I understand correct, when using webdialogs on PC, Internet Explorer is used.
      When using webdialogs on Mac, safari is used.

      What happens if the user does not have IE or safari installed but Chrome or Firefox?
      Is the webdialog handled by Chrome or FF then?

      This means the webdialog javascript has to be cross-browser valid (not only IE and safari).
      Correct?

      posted in Developers' Forum
      P
      Pout
    • RE: SU Ruby + XML

      @unknownuser said:

      @pout said:

      So you import the xml file into the webdialog and in there you parse it? With a javascript script or something else?
      I'm getting lost here.

      I display a webdialog. In the webdialog, on some user action, (a javascript event), a javascript function calls a Ruby callback, which iterates over the SketchUp model and builds an XML document of it. Then, the callback finished by setting a javascript variable with the xml document. Then, back in javascript, I call the browser to parse the XML document. I then (in javascript) iterate over the parsed document to build my dynamic html <table>.

      Todd

      ok, i get this.
      But different browsers have different ways to parse XML data.
      What kind of code do you use so each browser can handle the xml?
      In my case i want to import an xml.
      So i parse it with the webbrowser of the webdialog. But due to the several possible browsers (IE 5-6-7, Safari, FF, ...) this is so difficult to manage.
      Do you have a cross browser script that reads XML files?

      posted in Developers' Forum
      P
      Pout
    • 1 / 1