Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Baselign grid and Dcument Grid is not on

Explorer ,
Jul 28, 2014 Jul 28, 2014

When run this script, we have to manually on with right click option on document. Please resolve this.

var myDocument = app.activeDocument;

//Set the document measurement units to points.

myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;

myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;

//Set up grid preferences.

with(myDocument.gridPreferences){

    baselineGridRelativeOption=BaselineGridRelativeOption.TOP_OF_MARGIN_OF_BASELINE_GRID_RELATIVE_OPTION

baselineStart = 14;

baselineDivision = 14;

baselineShown = true;

horizontalGridlineDivision = 14;

horizontalGridSubdivision = 5;

verticalGridlineDivision = 14;

verticalGridSubdivision = 5

documentGridShown =true;

}

TOPICS
Scripting
485
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Jul 29, 2014 Jul 29, 2014


change baselineShown = true;


to


baselineGridShown = true;



Vandy

Translate
Enthusiast ,
Jul 28, 2014 Jul 28, 2014

Could you please explain clearly...

Vandy

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 29, 2014 Jul 29, 2014

This script is for Grid preference. Please see the bolded lines in script. They are true in script. But, after we run the script, we have to check(ON) the show  document grid and show Baseline grid in indesign. baselineShown = true and documentGridShown =true do not make result. only If the options are are already shown in document, the grids are appearing. Please explain what is wrong in script.

var myDocument = app.activeDocument;

//Set the document measurement units to points.

myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;

myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;

//Set up grid preferences.

with(myDocument.gridPreferences){

    baselineGridRelativeOption=BaselineGridRelativeOption.TOP_OF_MARGIN_OF_BASELINE_GRID_RELA TIVE_OPTION

baselineStart = 14;

baselineDivision = 14;

baselineShown = true;

horizontalGridlineDivision = 14;

horizontalGridSubdivision = 5;

verticalGridlineDivision = 14;

verticalGridSubdivision = 5

documentGridShown =true;

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 29, 2014 Jul 29, 2014


change baselineShown = true;


to


baselineGridShown = true;



Vandy

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jul 29, 2014 Jul 29, 2014

Hi,

What is your app.layoutWindows[0].screenMode value after script's run?

Jarek

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 29, 2014 Jul 29, 2014
LATEST

Hm, documentGridShown should work for you, as it works here too. baselineShown cannot work, because it must be baselineGridShown = true;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines