• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Annoying "Reference to a deleted page"

Scheduled Pinned Locked Moved Plugins
4 Posts 3 Posters 213 Views
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.
  • D Offline
    Didier Bur
    last edited by 13 Jan 2012, 18:04

    Hi guys,

    After an extensive search here (and there), I didn't find an answer to this problem:

    Suppose I have a scene named "Plan" in my model,

    
    @model=Sketchup.active_model
    @pages=@model.pages
    @pages.erase(@pages["Plan"])
    
    #... some code here ...
    
    @pages.add("Plan", 127, 0)
    
    

    cause this error message:

    @unknownuser said:

    Error: #<TypeError: reference to deleted Page>
    C:\Program Files\Google\Google SketchUp 8\Plugins...

    I tried to rename the page to delete before erasing it but no luck. πŸ‘Ž
    Saving the file also doesn't solve the problem (was thinking some garbage collector or similar would clean the memory and SKP 😞 )
    Even creating a brand new file doesn't work, it seems that deleted objects remains through SKP's that are edited...)

    Any idea someone ???
    Thanks in advance,

    DB

    1 Reply Last reply Reply Quote 0
    • G Offline
      gullfo
      last edited by 13 Jan 2012, 21:10

      almost sounds like a hash value pointing to the deleted page is embedded in the doc - perhaps preserved because of a layer or component value? maybe clear layers and purge the file?

      Glenn

      http://www.runnel.com

      1 Reply Last reply Reply Quote 0
      • T Offline
        TIG Moderator
        last edited by 13 Jan 2012, 22:09

        I just replicated your code... but with NO problems.
        Page erased 'by name', later on a new page with its name was added - with no issues...
        v8M2 Vista
        πŸ˜•

        TIG

        1 Reply Last reply Reply Quote 0
        • D Offline
          Didier Bur
          last edited by 14 Jan 2012, 05:52

          Thanks guys,
          You pointed me to my error, which were elsewhere in the code. Solved !

          DB

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

          Advertisement