Skip to main content
Inspiring
November 13, 2018
Answered

How to fill a block with a grid in indesign ?

  • November 13, 2018
  • 2 replies
  • 2895 views

Hello,

could someone tell me How to fill a block with a grid (0,5 cm x 0,5 cm for example with 0.2 mm thick lines) in indesign ?

Thank you from France... 😉

Fabrice

This topic has been closed for replies.
Correct answer FABGROOVE

Hi Fab,

so you wanted to add a grid with a 1 mm distance and 14 pt strokes?

No? No… :-)

horzontal(  );

vertical(  );

are function calls.

The first value inside the function call is for the distance.

The second value is for the stroke weight.

Both values in the call are separated with a comma.

For a 5 distance ( in millimeters ) and a 0.2mm stroke weight you will do:

horizontal( 5 , "0.2mm" );

vertical( 5 ,"0.2mm" );

and not:

horizontal( 1 , "14pt" );

vertical( 1 , "14pt" );

Do not do commas in fraction numbers. Just use a dot instead.

One half is 0.5 in JavaScript and not 0,5 .

Try again :-)

Regards,

Uwe


Thanks again... ;-)

In fact, I had a bug on my file... (??)

I tested the script on a new file and ... ALLELUYA !! it works.

Thank you for your patience and your precious help.

Fab

2 replies

Colin Flashman
Community Expert
Community Expert
November 14, 2018

There is a thread from about a year ago where my old prepress manager was after the same thing, and Peter Kahrel wrote a script that did just that: Grap Paper Script

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!
FABGROOVEAuthor
Inspiring
November 14, 2018

Merci beaucoup. Oui, c'est exactement ce que je cherche, sauf que je n'ai pas réussi à adapter le script à mes dimensions (quadrillage uniforme de 5 mm).

Tant pis, je ne maitrise pas la programmation.

Merci encore.

Thank you so much. Yes, that's exactly what I'm looking for, except that I have not been able to adapt the script to my dimensions (5mm uniform grid).

Too bad, I do not master the programming.

Thanks again.

Community Expert
November 15, 2018

Hi FABGROOVE ,

I guess you mean Peter Kahrel's script here:

Re: Grap Paper Script

The one that does 1 mm, 5 mm and 10 mm divisions?

Be brave, edit the code!

Comment out the following lines 48, 50, 51 and 53 like below.

Also edit the values of the remaining two for distinct millimeter values:

// horizontal (10, '0.75pt'); 

horizontal (5, '0.2mm');  // Changed to millimeter values.

// horizontal (1, '0.25pt'); 

// vertical (10, '0.75pt'); 

vertical (5,'0.2mm');  // Changed to millimeter values.

// vertical (1, '0.25pt'); 

The script will do 5 mm divisions, only with 0.2 mm strokes.

Save the code as text file without formatting with suffix *.jsx and a meaningful name like: FiveMillimeterGrid.jsx

Then install the script file so InDesign can see it in the User folder of the Scripts panel. How to install the script file:

Information, script locations, payments/donations | Peter Kahrel

Draw out a rectangle on the page or select a rectangle.

To run the script double-click the name of the script in the User folder of your Scripts panel.

Regards,
Uwe

maxwithdax
Community Expert
Community Expert
November 14, 2018

Hi Fabgroove,

Are you are asking for a table with 5 cm square cells  or are you asking for grid lines on the document where you can create your own text boxes or image blocks?

Please clarify so we can provide you with the best answer for your desired outcome.

-Dax

FABGROOVEAuthor
Inspiring
November 14, 2018

Hello and thank you for your answer.

In fact I wanted to know if we could create a form of filling as in illustrator ... We would fill a shape not with a color but a shape ... In this case here a square of 5mm x 5mm with a line of 0 , 2 mm thick ....

So I would like to fill a block so as to represent a grid ...

Is that clearer ?

jmlevy
Community Expert
Community Expert
November 14, 2018

Bonjour,

Tout d'abord, tu aurais plus de chances d'obtenir des réponses en français en postant sur le forum francophone : Forums en français

Pour répondre à ta question, on ne peut pas créer de motifs comme dans Illustrator, mais il suffit que tu crées une série de lignes de l'épaisseur souhaitée de manière à obtenir un carré un peu plus grand que les 5 mm dont tu as besoin, de grouper ces lignes. ensuite, tu copies ce groupe (ou tu coupes), tu sélectionnes le carré de 5 x 5 et tu « colles dedans ».