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

    Guid

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 342 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
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement