theatre icon indicating copy to clipboard operation
theatre copied to clipboard

Not able to delete project or sheet

Open talhaozdemir opened this issue 1 year ago • 2 comments

It would be good if we can delete project like

core.detachProject("Project");

and for sheet;

  const project = core.getProject("Project");
  project.detachSheet("Sheet");

talhaozdemir avatar Feb 28 '23 10:02 talhaozdemir

Yes, this feature is needed

GhostCatcg avatar Nov 07 '23 10:11 GhostCatcg

Experimental API for forgetting objects/sheets has been implemented a few months back, see #393 @AriaMinaei any reason why this is not yet out of experimental? +A mention in the docs would be great for newcomers!

studio.transaction((api) => {
  // calling this will make it as if you never set values for this object or put it in a sequence
  api.__experimental_forgetObject(object)
  
  // calling this will make it as if you never set values for _any_ object in this sheet, and you never created a sequence either.
  api.__experimental_forgetSheet(sheet)

  // note that if you're calling __experimental_forgetSheet(), then there is no need to call __experimental_forgetObject() in case that object belongs in that sheet.
})

jo-chemla avatar Apr 15 '24 16:04 jo-chemla