sketchucation logo sketchucation
    • Login
    1. Home
    2. BryanHL
    3. Topics
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    B
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 11
    • Groups 1

    Topics

    • B

      Polyhedron plugin for review

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      4k Views
      BoxB
      Ok, I'll uninstall and move on.
    • B

      Error: #<TypeError: reference to deleted Entity>

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Bug Reporting sketchup
      2
      0 Votes
      2 Posts
      8k Views
      TIGT
      Fredo reported this a while ago. With recent versions if you have a reference set up for an entity etc and it gets recreated - e.g. during an explode - the reference changes and so there's an error as some code finds an invalid reference. Most developers have now trapped for this in their code - e.g. setting a reference to an entity does not persist after an operation like explode, so you need to grep the result of the explode to re-collect the object[s] to re-find that entity - using persistent-id or a custom attribute assigned to the entity... In older versions an explode etc did not destroy the reference to an entity, so your code could reference it inside a group and find it again after the explode... the persistent-id changes broke this and a workaround is needed, as explained. I suspect that the old DC code has not been fully updated to avoid the 'delete entity' reference messages... It's a straightforward fix to trap for it - but SketchUp seems unwilling to devote much time to DCs - they have new fish to fry...
    • B

      Namespace in Multiple .rb Files

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      5k Views
      B
      @pixero said: If you temporarily comment out the line: unless file_loaded?(FILE) you can run the script again without restarting SU but you will get a new plugin menu entry for every time you run it. I had been loading the script from the console, then created a menu entry to do just that (from your How to Debug thread), but naively assumed it would reload any required files. Added another menu entry for the file in question and all is good...
    • B

      Scale howto - FredoScale???

      Watching Ignoring Scheduled Pinned Locked Moved Extensions & Applications Discussions extensions
      2
      0 Votes
      2 Posts
      2k Views
      B
      To answer my own post, I don't think it can be done because the angles change at one end of a strut, relative to the material thickness and radius of the sphere.
    • B

      Beginning Ruby - Array and other Questions

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      1k Views
      TIGT
      You can't rely on the ordering of a selection or an entities collection. Also you should never 'loop' through a selection or an entities collection, IF your code will affect the selection or collection - since it's references will 'shift' - use .to_a to free it as an array if you must do this... If you are adding several faces you make a simple empty array at the start: faces = [] Then every time you make a face you can add that into that array. ... face = ... faces << face ... Later on you can access the faces array and its ordering will remain constant. You can only add geometry into an entities context - so that's either the model.entities [the lowest base level - even if not currently active], model.active_entities [current active context - which might be any collection], or any group.entities or definition.entities ... In passing, a group is just a special subset of a component. They both have a definition [so does an Image, but we'll not go there yet]. A definition can have instances - placed into some entities context. A component definition can have several instances - changing one changes the others. You can make an instance unique so that editing does not affect its relatives. A group definition can have several instances, BUT editing one of them automatically makes it unique. When iterating a definitions collection you can filter its members using defn.image? and defn.group? to choose or avoid those types...
    • 1 / 1