I’m currently working with the sketchup C APi on a little software that would allow me to automatize the creation of several layouts on basis of a .skp file representing a wooden house.
So I use SUModelCreateFromFile (everything is fine from here) and then i want to create new layers to add to the model, but I quite don’t get how to do it.
Let’s say for example that I would like to create a layer allowing to toggle all the outer panels of the house. I Can make a std::vector containing all the component instances I need (works fine from here), but then what?
I’ve tried to create a group containing all these component instances, but i can’t add the instances to the entities of this group. (i.e. SUEntitiesAddInstance returns an error)
I’ve also tried to create one layer per panel, using SUComponentInstanceToEntity and then SULayerFromEntity, but the SUModelAddLayers won’t work…
I’m quite confused. I can provide you with some piece of my code if this can be of any help.