sketchucation logo sketchucation
    • Login
    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!
    🚨 Skimp | 25% Off until March 30 Buy Now

    Guid

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 434 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.
    • K Offline
      kwalkerman
      last edited by

      New for 2014 is a guid for ComponentInstances and Groups. I have done a little experimenting and it seems that this guid is persistent when a file is saved and re-opened. It is also persistent when the entities inside the collection are changed (ie, the guid is persistent when the definition is changed).

      The behavior of the ComponentDefinition guid (introduced in Version 6) is completely different. THIS guid is not persistent between models and changes any time the definition is changed:

      http://www.sketchup.com/intl/en/developer/docs/ourdoc/componentdefinition#guid

      It would be really nice to have the new version of guid work for both the types of objects...

      Now for the question: Is there any way to get the object referenced by the guid? Something like:

      ObjectSpace._id2ref(obj_id)
      

      This would allow storing the guid in an attribute dictionary somewhere and then recalling the object quickly.

      Thanks,

      Karen

      1 Reply Last reply Reply Quote 0
      • tt_suT Offline
        tt_su
        last edited by

        Yes, you are correct in your observation, the Group.guid and ComponentInstance.guid is persistent throughout their lifetime regardless of their changes. This was added to support the IFC exporter.

        The old ComponentDefinition.guid is still not persistent, it changes. I'm not aware of the historical reasons for this.

        Currently there is no API method to fetch an entity from a guid.
        That is a feature that is often requested and we have it on our list.

        1 Reply Last reply Reply Quote 0
        • K Offline
          kwalkerman
          last edited by

          Thanks.

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better πŸ’—

          Register Login
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement