Tuesday, March 30, 2010

Show/Hide Structure Pane

Hi all,

I want to show/hide the structure pane in the indesign document dynamically using Indesign scripting. Is it possible to do that through indesign scripting? Please help me out.

Thanks in advance,

Anitha

Show/Hide Structure Pane

Hi

Try this by changing value true %26amp; false

app.activeDocument.xmlViewPreferences.showStructure = false;

Show/Hide Structure Pane

Hi,

Thanks for your reply. I am using Adobe Indesign CS3. I guess ''XMLViewPreferences'' is not available in CS3. Its giving me error, when i try to run the script.

Thanks,

Anitha

I am also using CS3 and getting as expected. May I know what u tried?

This is what i have tried,

var myDocument = app.open ('sample.indt', true);

I am adding some data into the template and am trying to save it as an .indd file. Before saving it, am trying to set ''showStructure'' as false.

app.activeDocument.XMLViewPreferences.ShowStructure = false;

myDocument.save(new File('test.indd'));

But its giving me an error saying ''Object does not support the property or method activeDocument''.

Kindly help.

change this line

app.activeDocument.XMLViewPreferences.ShowStructure = false;

as

app.activeDocument.xmlViewPreferences.showStructure = false;

yeah. I tried that too. I guess the issue is that the Application object 'app' doesn't contain a property called 'activeDocument'. I checked it in Help-%26gt;Adobe Indesign CS3 Server Object Model too. The property 'activeDocument' is not being listed under Application.

Kindly help.

You can surely use app.activeDocument with InDesign CS3. Maybe you are within a with clause?

Also since you have defined myDocument you can use this variable instead.

Ralf

I dont understand wats the problem on ur side. Though, check target application is whether ''indesign cs3'' or not in toolkit.

or quit indesign and delete ''OMV'' file in the following path ''c:\Documents and Settings\%username%\Application Data\Adobe\ExtendScript Toolkit\2.0'' then restart indesign and check the same code.

or try as

myDocument.xmlViewPreferences.showStructure = false;

InDesign Server does not have an activeDoument. You need:

app.documents[0]

But why are you trying to set the structure pane visibility in ID

Server?

Harbs

Dear Anitha,

Just use below line:

app.activeDocument.xmlViewPreferences.showStructure=false;

As you know javascript is a case sensitive code.

ritu....

Hi Harbs,

I have a requirement where the structure pane should be hidden by default. I cant do it manually by opening the file and pressing Ctrl+Alt+1. I have to do in Indesign script. I am running the scripting using indesign server.


I checked in Help-%26gt;Adobe Indesign CS3 Server object model. ''xmlViewPreference'' and ''activeDocument'' attributes are not available. Please help.

Sorry I didn't mean server.?This works perfectly in Indesign CS3 desktop version.

I responded on the Server forum.

Harbs

Hi Anitha,

What you want to do with structure pane? Why you want to show it?

The object is not available with ID Server.

Ritu...

No comments:

Post a Comment