NWP 3 Document Properties Feature Requests

Everything related to our flagship word processor.
Post Reply
aersloat
Posts: 11
Joined: 2007-03-27 15:30:36

NWP 3 Document Properties Feature Requests

Post by aersloat » 2018-11-15 11:10:22

I am starting to leverage document properties, both standard and custom, into our workflow. Right now we are only using NWP for one specific task, which is writing and editing architectural specifications.

It is very handy to set up a bunch of document properties that I can push to a set of files using a macro. If I want to change the issue date for a set of files, for instance, it is a simple process of just pushing an update to a specific custom property.

As nice as this system is there are two things that would make it easier.

First, a floating palette or non-modal window for editing properties would be nice. Right now I am setting up two different kinds of properties -- properties that are applicable to a group of files (like a project number or issue date) and properties that are specific to a file (like a specification number) that might show up in a few different places in the document and are nice to edit quickly just once using the custom property window. The modal property sheet adds a bunch of clicks to the process.

Second, as we go through the ongoing exercise of converting years of files that were created in Pages the process of making sure the file is set up correctly is pretty straightforward except for identifying (quickly and visually) whether we have the desired inserted document property content. I always work in "show invisibles." Could we have some kind of shading, blocking, squiggled underlining, or similar that identified automatic content (of all kinds) in either the show invisibles mode or similar?

User avatar
martin
Official Nisus Person
Posts: 4483
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: NWP 3 Document Properties Feature Requests

Post by martin » 2018-11-15 11:34:53

I'm glad to hear Nisus Writer's custom document properties have been useful for your workflow! Thank you for your feedback and suggestions.
aersloat wrote:
2018-11-15 11:10:22
First, a floating palette or non-modal window for editing properties would be nice. ...
The modal property sheet adds a bunch of clicks to the process.
That's a potentially useful enhancement. I'll file the idea, thanks. In case it's helpful here's a macro that lets you edit a single custom property:

Code: Select all

$doc = Document.active
$props = $doc.properties
$propKey = Prompt Options "Edit which document property?", '', 'Edit...', $props.keys

$propValue = $props{$propKey}
$propValue = Prompt Input "Change '$propKey' to a new value:", '', 'Change', $propValue
$doc.setProperty($propKey, $propValue)
That macro is probably not terribly useful, especially if you're editing multiple properties, but it might save you a few clicks if you often edit a single value.
Could we have some kind of shading, blocking, squiggled underlining, or similar that identified automatic content (of all kinds) in either the show invisibles mode or similar?
The good news is that Nisus Writer already has this feature. Here's how to enable it:

1. Open your preferences.
2. Switch to the Appearance pane.
3. Look near the bottom for the label "Colors".
4. Select the color Automatic Text > Automatic Text.
5. Turn off the option to hide the highlighting and adjust its color however you like.

aersloat
Posts: 11
Joined: 2007-03-27 15:30:36

Re: NWP 3 Document Properties Feature Requests

Post by aersloat » 2018-11-15 14:18:53

Thanks Martin. I am not sure that I would have ever found that despite having spent some time with the manual.

aersloat
Posts: 11
Joined: 2007-03-27 15:30:36

Re: NWP 3 Document Properties Feature Requests

Post by aersloat » 2019-01-18 21:54:12

Custom properties have been working very well for us but there is one thing I can’t figure out. I would like to be able to do a find and then replace with a custom property.

Let’s say I have a date string in 10 different documents. Same date string. Each document also has the same custom property “date” that I have set with a macro. Right now to get to where I want I select the static date string and then go into the insert menu down into the date property.

It would be great if I could do a find on the static date string and replace with the custom property across all open documents. I tried to do a copy and paste into the replace pane from an inserted custom property but that did not work. After replacing the text reported something like “property not available in this document.’ I could not find anything in the manual that suggested a way to “address” the custom property in the replace pane.

No doubt a macro could be written, but I like the idea of being able to do this through the find and replace window, Any suggestions?

adryan
Posts: 244
Joined: 2014-02-08 12:57:03
Location: Australia

Re: NWP 3 Document Properties Feature Requests

Post by adryan » 2019-01-18 23:17:30

G’day, aersloat et al

I had a look at this and I can’t see how to do this purely in the Find/Replace system either.

But I did notice — as I think you have discovered — that pasting a property string from your document into the Replace field results (after a slight delay) in its being replaced (in the Replace field) with something like “Document does not have a ‘newdate’ property.”

Two curious things about this are that the case of the property name is not necessarily preserved in the error message and that (even if the property name is defined to be lowercase, in order to appease the replacement gods) the Formatting Examiner does recognize Custom Properties inserted in a document (with faithful ascription of case), which is at odds with the error message.

Cheers,
Adrian
MacBook Pro (mid-2014)
macOS Mojave 10.14.3
Nisus Writer user since 1996

User avatar
martin
Official Nisus Person
Posts: 4483
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: NWP 3 Document Properties Feature Requests

Post by martin » 2019-01-23 10:50:44

aersloat wrote:
2019-01-18 21:54:12
I tried to do a copy and paste into the replace pane from an inserted custom property but that did not work. After replacing the text reported something like “property not available in this document.’
The trick here is to checkmark the "Replace Formatting" option in the Find panel. If you don't then the custom property value is converted to plain text, which is just the warning message. If you checkmark that option then the smart content should come through correctly and eventually update to show the correct value once it's spliced into the destination document, though perhaps after a delay.

I'll see if we can improve this process so you don't need to checkmark that option if the replacement just involves a single piece of smart content.

adryan
Posts: 244
Joined: 2014-02-08 12:57:03
Location: Australia

Re: NWP 3 Document Properties Feature Requests

Post by adryan » 2019-01-23 11:53:09

G’day, Martin et al

I’m afraid the “Document does not have a ‘mydate’ property” error message is still generated when the Replace Formatting checkbox is ticked (and the mydate Property is recognized by the Formatting Examiner).

Cheers,
Adrian
MacBook Pro (mid-2014)
macOS Mojave 10.14.3
Nisus Writer user since 1996

User avatar
martin
Official Nisus Person
Posts: 4483
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: NWP 3 Document Properties Feature Requests

Post by martin » 2019-01-23 12:19:17

It works just fine for me. I'll attach a quick test document. Here's what I did:

1. Open the file.
2. Select and copy the existing custom document property (it is already inserted once).
3. Open the Find panel.
4. In the "Find what" field enter the word "target".
5. Enter the replace field and paste the custom document property.
6. Ensure the "Replace Formatting" option is checkmarked.
7. Click the Replace All button.

That behaves correctly for me. Each match of the word "target" has been replaced by a custom document property and eventually updates to show the correct date. Did you update the automatic content after the replacement finished?
Attachments
docproptest.zrtf
(2.75 KiB) Downloaded 60 times

adryan
Posts: 244
Joined: 2014-02-08 12:57:03
Location: Australia

Re: NWP 3 Document Properties Feature Requests

Post by adryan » 2019-01-23 13:19:53

G’day, Martin et al

All right. I tried it on your file, Martin, and I got the same result as I did on mine; viz, the error message appears in the Replace field. That’s why I didn’t go any farther.

This time, though, I hit the Replace All button regardless. Now, occurrences of the found expression in the document are replaced by the error message for a brief time before the error message text is itself replaced by the Property value.

So it does work, albeit confusingly. At least aersloat’s problem has a solution, but the mechanism could do with a bit of tweaking. :-)

Cheers,
Adrian
MacBook Pro (mid-2014)
macOS Mojave 10.14.3
Nisus Writer user since 1996

aersloat
Posts: 11
Joined: 2007-03-27 15:30:36

Re: NWP 3 Document Properties Feature Requests

Post by aersloat » 2019-01-23 13:29:04

Thank you, Martin.

That does work. It seems that the key is having the "Replace Formatting" box checked in the find/replace window. If you don't have that box checked (and I did not) the replace does not work. With the box checked it works just fine -- and works across all open docs, which is what I wanted. I just successfully updated a set of 20 files using the find and replace across all open files to convert static shared content into custom property content that I had already seeded via a macro. Worked great. What a time saver.

User avatar
martin
Official Nisus Person
Posts: 4483
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: NWP 3 Document Properties Feature Requests

Post by martin » 2019-01-24 16:20:03

aersloat wrote:
2019-01-23 13:29:04
Worked great. What a time saver.
Wonderful, I'm glad to hear it :) thanks for letting us know!

Post Reply