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

    ComponentDefinition.instances strange behavior. Bug?

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 256 Views 2 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.
    • V Offline
      Viskiz
      last edited by

      I have two ComponentDefinitions (d1 and d2) in model. Each of them has one instance. Strange thing begins, when I make a new Component of the both instances and then explode it. Then d1 and d2 instances returns me array of length 2.

      d1.instances -> #[#Sketchup::ComponentInstance:0x6ba89c4]
      d2.instances -> #[#Sketchup::ComponentInstance:0x9bc96e4]

      Using mouse I select both instances, make Component of them and explode it.

      d1.instances -> [#Sketchup::ComponentInstance:0x6ba89c4, #Sketchup::ComponentInstance:0x9bc2164]
      d2.instances -> [#Sketchup::ComponentInstance:0x9bc96e4, #Sketchup::ComponentInstance:0x9bc1fd4]

      but there is no any new instances in model, outliner does not show them too. Is it a bug or I misunderstand something? Maybe there is some purge function for d.instances or something?

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        Because after exploding you have instances in your model and in the definition of the instance you just exploded. Remember that definitions doesn't disappear when they are unused - you need to purge them.

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

        1 Reply Last reply Reply Quote 0
        • V Offline
          Viskiz
          last edited by

          Thanks!

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement