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

How to Define a default stroke in InDesign

Explorer ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

For years I had a default stroke of 0.25 point (black) set and it worked fine. Now, whenever I go to create a new line (I use these for callouts), the settings are correct, however the line path is created but without a color or width assigned to it. Just the "placeholder" is present, which I have to go in and fix Every. Single. Time.

 

I need to do hundreds of these and I don't know what I messed up (or when), but it's driving me crazy. Any thoughts?

 

In this top image the supposed-default setting of black/0.25pt is selected.

PeterDNJ_1-1679240761012.png

As soon as I attempt to draw a line with these settings this is what results:PeterDNJ_2-1679240789273.png

Result: 0 pt line, no stroke color.

 

{Renamed By MOD}

 

TOPICS
How to

Views

4.9K

Translate

Translate

Report

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

Community Expert , Mar 19, 2023 Mar 19, 2023

I have applied the script and it does appear to have solved the problem

 

You can perform the same steps as the script manually. With a document open, make sure there is nothing selected, double click the [Basic Graphics Frame] Object Style, set the dialog’s Fill to [None], the Stroke to [Black], and the Stroke Weight to .25. Click OK and leave the default Object Style as [Basic Graphics Frame]. If necessary clear overrides by Option-clicking the style.

 

The script does the above with one click

...

Votes

Translate

Translate
Community Expert ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

Define it with no files open to make it a default for all new files. With nothing selected to redefine the default in existing files.

Votes

Translate

Translate

Report

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 ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

Dumb question, but how can I do this with no files open?

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

Open InDesign, open the Stroke panel, set the weight.

Votes

Translate

Translate

Report

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 ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

It is set correctly but still doesn't work.

 

With no documents open, the stroke panel shows this:

PeterDNJ_0-1679244172522.png

If I create a NEW document it works correctly, but on existing documents it does not work. Obviously something has gotten corrupted in these documents, including the 500MB document I need to work with and revise daily.

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

Hi Peter:

 

So check your object style settings as shown below next.


It may be a inadvertent selection and not corruption. I'm also happy to take a quick look at blank page from that file so that I can check your defaults. You can put the page on dropbox (or other file sharing server) and post a link here (public) or message me directly (private). The page does not need to include any content. 

 

~Barb

Votes

Translate

Translate

Report

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 ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

With no document open, Object Styles are currently showing as [None]+

If I override and clear all, then the stroke goes to 0/no stroke, so with the stroke set as desired it reverts to none-plus.

 

With the document that I work in open it defaults to a hard none and the stroke goes to 0. If I change the stroke as desired the object style gets set to [None]+ as before, but any new attempt resets it to 0. Every change I attempt results in the corrupted result when I try to draw a new line.

 

How can I put just a blank page from that document on Dropbox?

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

Save the file. Delete the content. Save it as example.indd, or similar (don't overwrite the good file).

https://www.businessinsider.com/guides/tech/how-to-upload-files-to-dropbox

 

~Barb

 

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

If I create a NEW document it works correctly, but on existing documents it does not work.

 

Unless I'm missing something, that's exactly how it's supposed to work.

 

The suggestion to set it while nothing is selected is a subtle ID feature that trips up many users. If nothing is selected in a doc and you set stroke width, font, color etc., that becomes the default for all further operations. Everything you create will have a stroke around it, be magenta, etc. The fix is to again set the value with no element in the document selected.

 

But I believe these defaults are stored on a document by document basis. If you set a value with no file open, it will apply to a newly created doc. But if you open a previous doc, the value will be reset to whatever value was last set with it open. The solution there is to again set the value with no object selected.

 

So I think you're seeing ID behavior exactly as it's supposed to be. You will have to set/reset these default values in each doc you reopen. The "mistake" was setting the values with no object selected; avoid that in the future unless you mean to set a new default.

 


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

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 ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

quote

If I create a NEW document it works correctly, but on existing documents it does not work.

 

Unless I'm missing something, that's exactly how it's supposed to work.

 

If you set a value with no file open, it will apply to a newly created doc. But if you open a previous doc, the value will be reset to whatever value was last set with it open. The solution there is to again set the value with no object selected.

By @James Gifford—NitroPress

What you are missing is that doing as you suggest (existing document, nothing selected, setting desired values DOES NOT WORK. It used to work but no longer does. I'm not worried about new documents (I rarely create anything new where this is a concern), but the existing document is revised on a daily basis for re-release yearly and absolutely needs this functional.

 

This is a screen cap of my open document, a blank page, with the STROKE and OBJECT STYLES boxes open. There is nothing on this page, and the hand tool is in use (i.e. to ensure nothing from a different page is selected).

PeterDNJ_0-1679255809283.png

As you can see, the stroke is set correctly and [NONE]+ object style is indicated. Now this happens when I press the backslash key and draw a line (LINE TOOL):

PeterDNJ_1-1679255902637.png

It reverts to 0pt, no stroke with object style set to NONE. I do use object styles in the document, but for most items I will never want that feature enabled. What do I need to set to get my line tool back to normal?

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

I see the problem, your default Object Style is set to [None], and the [None] OS can’t be edited—its stroke weight is set to 0. You would have to set the default Object Style to something else, then set your default stroke and fill.

 

The script for that would be this:

 

 

var os = app.objectStyles.itemByName("[Basic Graphics Frame]")
os.properties = {strokeWeight: .25, strokeColor:"Black", fillColor:"None"}
app.pageItemDefaults.properties = {appliedGraphicObjectStyle:os};

var d = app.documents;
if (d.length > 0) {
    for (var i = 0; i < d.length; i++){
        d[i].select(NothingEnum.NOTHING)
        d[i].pageItemDefaults.properties = {appliedGraphicObjectStyle:os};
    };   
} 

 

 

Here’s a saved .jsx, which you can download and copy into your scripts folder:

https://shared-assets.adobe.com/link/3a42d3c5-57f2-4f5c-575b-42a7f6ad7370

 

Before and after running:

Screen Shot 27.pngScreen Shot 28.png

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

If I create a NEW document it works correctly, but on existing documents it does not work.

 

Hi @PeterD-NJ , I don’t think there is a corruption—as James noted, the page item default preference is both an application and document level preference—most InDesign preferences work that way.

 

So you set the application’s behavior by setting the stroke with no documents open, but all existing documents can have their own default behavior, which is why your existing documents are not responding to the application default you set with no docs open.

 

The page item defaults are scriptable. This script would change the application default and the defaults for any open documents:

 

 

var p = {strokeWeight: .25, strokeColor:"Black", fillColor:"None"}
app.pageItemDefaults.properties = p
var d = app.documents;
if (d.length > 0) {
    for (var i = 0; i < d.length; i++){
        d[i].pageItemDefaults.properties = p;
    };   
} 

 

 

If you really want it to be the same for every document you open, a startup script could listen for an open event and change the defaults for every document you open. I can post that code if you are interested.

 

Votes

Translate

Translate

Report

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 ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

Thanks for the script and I'll consider that as the last resort. But since I've never heard of scripts before, I'd rather fix what broke rather than apply a work-around if at all possible, and to maybe understand why it happened in the first place. This document is a pig--over 500 Mb, opened, edited and closed a lot, and since it's on a PC, it crashes at least once every few days with the document open. I have no doubt that whatever happened, happened in such a crash.

Resetting preferences is an absolute non-starter; I have SO many custom keyboard commands remapped that took me months to find. I did this once last year before I went to press and it took me another 9 or 10 weeks to make it all work again. To say I'm computer illiterate is an understatement. Having to re-learn how to work with ID after having things function in a way I've understood for over 10 years is terrifying, quite frankly.

 

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

Resetting prefs does not affect custom keyboard shortcuts. It does cure a lot of odd behavior, though.

That said

>>> This document is a pig--over 500 Mb, opened, edited and closed a lot, 

This is probably the problem. How often do you do a Save As? Best practice is to do it after every editing session, and better is to do it with a new name incluing some sort of versioning code so you have a backup chain. Doing a Save As removes the old and useless change information from the file which adds bloat and increases the probability of corruption.

It would be a good idea to export this file to .idml, open that and save as a new .indd file. For backup safety do not overwrite the old file. Either use a new name, or make a copy of the old file in a new location before you export. This will remove minor corruption from your file.

 

Votes

Translate

Translate

Report

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 ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

I usually do this every day or at most every two days. I'll save it as -1 and -2, delete the original and save the -1 or -2 as the original document name.

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

500mb?? 

 

Hope you are not embedding graphics? 

 

Try IDMLing to clean your file - if it crashes so often... 

 

Votes

Translate

Translate

Report

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 ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

I convert to IDML from time to time but usually only about once a month or so since it kills at least 90 minutes to do. All graphics are linked—at least I think they are; they show up as linked and if I edit the original I have to update the links panel.

It's a 192-ish page illustrated document with hundreds of images, probably 3000 or 4000 text boxes, callouts, and all sorts of goodies. Files are 95% Illustrator-generated vector PDFs.

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

Then maybe try to split into smaller parts - and if needed use Book option? 

 

90 minutes of exporting / importing as IDML is horribly long... 

 

Votes

Translate

Translate

Report

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 ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

It used to be three separate files for years. I merged them in 2012 and it's been fine since. I can deal with the occasional crash and the saving times, etc; it's just my regular workflow. No, I don't like the fact it's 526 MB (the IDML is 17 MB!!!), however it usually behaves exactly as I expect, until this situation occurred. As mentioned earlier, I'm not comfortable around computers on the best of days (I'm in my 60s and an ex-railroader for a career), and I'll go out of my way to keep things working the way I'm accustomed to.

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

What is the config of your computer? Maybe you need an upgrade... 

 

Votes

Translate

Translate

Report

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 ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

Gigabyte X570 Aorus Pro board, Ryzen-7, 128 GB of RAM, two Samsung 970 2TB nVME drives, Windows 11, NVIDIA GeForce 1660 series. It's plenty quick 🙂

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

Should be 😉 

 

So which part takes 90 minutes?? 

 

Votes

Translate

Translate

Report

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 ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

Generating an IDML from INDD takes 60-90 minutes, which is why I don't do it very often. 

Votes

Translate

Translate

Report

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 ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

I have applied the script and it does appear to have solved the problem—thanks—however I wish I could have done this without needing to use this step. It definitely appears to be related to the "none" object style; beats me how this affects things or why I can't change it. SO frustrating....

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 19, 2023 Mar 19, 2023

Copy link to clipboard

Copied

LATEST

I have applied the script and it does appear to have solved the problem

 

You can perform the same steps as the script manually. With a document open, make sure there is nothing selected, double click the [Basic Graphics Frame] Object Style, set the dialog’s Fill to [None], the Stroke to [Black], and the Stroke Weight to .25. Click OK and leave the default Object Style as [Basic Graphics Frame]. If necessary clear overrides by Option-clicking the style.

 

The script does the above with one click. As I mentioned a startup script could force a desired default behavior for every document you open. I don’t think resetting your prefs is necessary.

 

 

Votes

Translate

Translate

Report

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