SketchAPI icon indicating copy to clipboard operation
SketchAPI copied to clipboard

Set Data Source on a Layer via API

Open paintedbicycle opened this issue 7 years ago • 7 comments

Hello,

I am wondering if it is possible with the Sketch API to set a layer to use a specific data supplier data source programatically? i.e. Replicate what Sketch is doing when a user selects a Data Feed for the layer - but I want to be able to do that from my plugin, in order to perform several steps at once.

In my plugin, I register a data supplier: index.js

  DataSupplier.registerDataSupplier(
    'public.text',
    'Auto (Layer Name)',
    'SupplyAutomatically'
  );

And I want to know if I can set a layer to use that data supplier via the API.

Thanks,

Paul

paintedbicycle avatar Nov 27 '18 19:11 paintedbicycle

That’s not possible at the moment, but sounds like a reasonable request so we’ll see what we can do. Thanks for getting in touch!

bomberstudios avatar Nov 27 '18 20:11 bomberstudios

OK - thanks @bomberstudios

paintedbicycle avatar Nov 28 '18 07:11 paintedbicycle

Hey @acf! I see the backlog label just added and I see backlog stuff in this repo going back years.

Just so I can plan my plugin development - does this label mean it's not a priority at all and I should find another solution?

Thanks!

Paul

paintedbicycle avatar Dec 03 '18 11:12 paintedbicycle

:-). Sorry @paintedbicycle, internal development process leaking out into the wrong repo!

acf avatar Dec 03 '18 15:12 acf

Let's keep it open, that's def something we want to expose in the API :)

mathieudutour avatar Dec 04 '18 07:12 mathieudutour

Hey, we are building something similar, ie, to use DataSupplier in a webview. This will be super helpful.

iamfnd avatar Jul 26 '19 02:07 iamfnd

@bomberstudios @mathieudutour Do you have plans to release this feature soon?

oscarmarcelo avatar May 09 '20 14:05 oscarmarcelo