Create internal component?


#1

Is there a way to create an internal component in the sdk? So far I create my object in a new sketchup model and then save it out. In ruby I am importing that file into the active model. Is there a better way?


#2

You either insert a new instance of a component definition that is already contained in the definitions list of the current model, or you import it from a file.
The “internal” components that ship with SketchUp are also saved as files, and “insert” will import them from these files.

The API and SDK do not fully support multiple document interfaces, and I don’t think you can keep a component in memory (like an html document fragment) and insert it into another model.