sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    The new? Trimble Sketchup SDK

    Scheduled Pinned Locked Moved Developers' Forum
    9 Posts 3 Posters 1.5k Views 3 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.
    • T Offline
      th3lurker
      last edited by

      Hi!
      Been gone for a while, and i am not really up-to-date on the news. So this is more of a please help me understand the situation, rather then a technical question. I developed an exporter some while ago, which had (and still has) problems. Most of them related to having to use ruby as the export tool(writing to a temporary file and then reading and interpreting it in ruby and creating the .skp, using a Sketchup itself).
      While a C++ SDK existed while Google owned Sketchup, they were clear that they would not support the kit, and thus we chose Ruby.
      But now, checking around again it seems Trimble has deprecated the old SDK and created a new one? I mean http://www.sketchup.com/intl/en/developer/su-api/index.html.
      Is it reliable? Is it usable? What can you guys tell me about this SDK?
      Thanks

      1 Reply Last reply Reply Quote 0
      • bugraB Offline
        bugra
        last edited by

        Hi th3lurker,

        Yes, this is a brand new SDK that exposes a C interface. We think it exposes cleaner API and it is easier to use. We are fully committed to supporting it for the foreseeable future. It is not yet as fully featured as the old SDK was, especially for creating skp files, but we are slowly building up the needed features and we need more feedback. So please check it out if you can.

        Thanks!
        Bugra Barin
        SketchUp Team

        1 Reply Last reply Reply Quote 0
        • G Offline
          Gábor
          last edited by

          Great news. Where is it downloadable from?

          1 Reply Last reply Reply Quote 0
          • bugraB Offline
            bugra
            last edited by

            Here it is:
            http://www.sketchup.com/intl/en/developer/sdk_start.html

            1 Reply Last reply Reply Quote 0
            • G Offline
              Gábor
              last edited by

              Thank you for the download link. I'll try it out for sure.

              1 Reply Last reply Reply Quote 0
              • T Offline
                th3lurker
                last edited by

                That's great news Bugra, but could you be a little more detail what you meant with "It is not yet as fully featured as the old SDK was, especially for creating skp files"?
                Cause i would like to use it, but only when i am certain i can implement everything i need to implement.
                Basically i need to create a few (thousand) volumes, split then in named groups and subgroups, set them on named layers, place and position non-standard external textures(.png) on most of the faces, smoothen some edges. Probably set some edges to invisible, because of triangulation and all. Lock a group, name the skp. There's probably a lot more, but i need to revisit my code to sure. We are on very different time zones so i am writing from home, hoping i find an answer in the morning. 😄
                Cheers

                1 Reply Last reply Reply Quote 0
                • bugraB Offline
                  bugra
                  last edited by

                  I think we can do most of those but not all. Take a look at the SUGeometryInput family of functions. It lets you create big meshes of geometries at once and add them to an "Entities" using SUEntitiesFill. We don't have great support for modifying the geometry once you create it though. So creating geometry and splitting them into groups would not work yet. You'll have to create them in the group to begin with. So it requires a bit more careful programming as it stands today. We also don't have support to lock groups. I'll add that to our list.

                  Thanks!
                  Bugra

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    th3lurker
                    last edited by

                    Sorry if i seem lazy, i could probably figure all of this myself if i spent enough time looking at the documentation, but i figured one of the developers can give me more insightful info.
                    So i've made a list of things i need to do, if it's not too much to ask can you tell me if these functions are implemented? Is everything i see in the http://www.sketchup.com/intl/en/developer/su-api/globals_func_0x73.html#index_s list operational?
                    I'll try to keep it in a "chronological" order
                    Edit: 0. One click export. Click a button in our UI and:

                    1. Open a specific .skp file (we use templates)
                    2. Create new named layers and set entities' layers
                    3. Create a tree structure of named groups, some containing named entities
                      3b.Iterate through the tree structure to find a certain group(stupid question, but still).
                    4. Create new faces and add custom textures on them, position and stretch texture material, set opacity
                      4b. I used to create new faces using a mesh(because of speed issues), but this poses several problems. The face does not "exist" until i use fill faces from mesh, so i have to store the texture information separately. Fill from mesh erases all entities that existed previously in the group, so i have to wait until i am sure i have no more faces to add to the mesh. Could i use SUFaceCreate instead? Like i said, speed is an issue here, some of out projects have thousands of entities, and 10+ faces/ entity is not uncommon.
                    5. Set edge smoothness
                    6. Locking the group is not that important
                    7. Save the file
                    8. Are the .skp's backwards compatible?(sketchup8, maybe even 7, i have no real idea what the clients use).
                      Sorry for disturbing you again.
                    1 Reply Last reply Reply Quote 0
                    • bugraB Offline
                      bugra
                      last edited by

                      Hi, sorry about the delayed response. One important thing about the current SDK is that it cannot work with the in-memory model that's live in SketchUp, it can only open existing skp files. So you'll have get the file saved first.

                      Here are some answers to your questions. For the ones I skipped, it means we should be able to do it.

                      @th3lurker said:

                      4b. I used to create new faces using a mesh(because of speed issues), but this poses several problems. The face does not "exist" until i use fill faces from mesh, so i have to store the texture information separately. Fill from mesh erases all entities that existed previously in the group, so i have to wait until i am sure i have no more faces to add to the mesh. Could i use SUFaceCreate instead? Like i said, speed is an issue here, some of out projects have thousands of entities, and 10+ faces/ entity is not uncommon.

                      Yes, you can use SUFaceCreate but using meshes (i.e. SUGeometryInput*) is currently the only way to map textures due to various reasons. We are looking into adding that to individual faces as well.

                      @th3lurker said:

                      1. Locking the group is not that important

                      We do not support locking groups yet. I'll make a note.

                      @th3lurker said:

                      1. Are the .skp's backwards compatible?(sketchup8, maybe even 7, i have no real idea what
                        the clients use).

                      We currently save only in the 2013 format. It's on our list to be able to save in older formats.

                      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