Extract parts of a model to make a new model

Hey Specklers

I have been brainstorming about granular workflows, so working with small chunks of the main model in the coordination/procurement phase.

I was wondering if there is a way to filter and extract parts of a main model to create new sub models. The “open selection in new window” is a pretty good start on this, I can select certain elements and initiate the open selection in new window feature, then share this URL with collaborators, which kind of works but as the model and scene explorer are exploded into individual items, it makes the data/geometry hard to use.

What is also interesting is that this URL still exists even after the page has been closed, I just need to select the link again. However that means that I need to save that link somewhere to go back to it, if this could be saved as a sub model and the model/scene work the same as the main model, that could create some interesting workflows.

@jonathon (Chris from Leko here)

There is an open topic on what we discussed about packaging elements into a single URL instance. It would be great to see the code snippet you suggested sharing. (Many thanks for that!)

Golly gosh, that slipped through the cracks — good to catch up at AAM! I’ll dig around for the Jupyter notebook that demonstrates these concepts.

I do have Jupyters with various parts of this working statically, but when it comes to actual user interaction, the frontend doesn’t really allow for this yet. That said, the POC I’m considering for a user-facing workflow would leverage the comment webhook, creating an interaction flow like this:

  1. Craft the selection
  2. Isolate
  3. Make a comment like package: leko demo — or something more polished
  4. Webhook fires
  5. External script picks up the event
  6. New model created with the name Packages/Leko Demo, containing the referenced objects

This feels light and natural, especially in environments where comments are already an integral part of the workflow.

Caveats to this approach:

  1. It requires hosting a script or function that can run in response to the webhook trigger.
  2. It only encapsulates the current version of the selected objects at the time of packaging — it won’t update automatically if new versions are created later.
  3. Ensure that the visibility of the created model matches your intended workflow.

Let me know if this direction lines up with what you’re thinking!