Skip to main content
Participant
May 6, 2014
Answered

C# .NET Photoshop.Application.togglePalettes()

  • May 6, 2014
  • 1 reply
  • 1173 views

Hey guys,

when I'm trying to call that function Photoshop.Application.togglePalettes() it fails and the compiler says:

'Photoshop.Application' does not contain a definition for 'togglePalettes'

Everything else works just fine, this is the only but serious problem. Due to performance reasons I need to toggle the palettes off for doing some intense layer manipulations.

Is that function not available in C# / through COM ?

Any help is much appreciated.

Thanks in advance.

This topic has been closed for replies.
Correct answer I have gone

It looks as if you are correct, it doesn't seem to be available in CS6 for me either, what does work is to send a JavaScript Call via COM, maybe you could use that?

ps.ApplicationClass app = new ps.ApplicationClass();

String RC = app.DoJavaScript("app.togglePalettes();", null, null);

ps.ApplicationClass app = new ps.ApplicationClass();

String RC = app.DoJavaScript("app.togglePalettes();", null, null);

1 reply

c.pfaffenbichler
Community Expert
Community Expert
May 6, 2014

In JavaScript

togglePalettes()

or

app.togglePalettes()

suffice.

Participant
May 6, 2014

I know that this works in JS. but I have requirements which force me to build the tools in .NET. As my question said I was wondering if this function isn't exposed via COM.

I have goneCorrect answer
Inspiring
May 6, 2014

It looks as if you are correct, it doesn't seem to be available in CS6 for me either, what does work is to send a JavaScript Call via COM, maybe you could use that?

ps.ApplicationClass app = new ps.ApplicationClass();

String RC = app.DoJavaScript("app.togglePalettes();", null, null);

ps.ApplicationClass app = new ps.ApplicationClass();

String RC = app.DoJavaScript("app.togglePalettes();", null, null);