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

Setting Different Measurement Units for Scripts on InDesign Server

New Here ,
Oct 31, 2024 Oct 31, 2024

Copy link to clipboard

Copied

I'd like that scripts runned by one user, use Millimeters as measurement unit, yet the same scripts but for another user - points.
Is it possible ?

 

 

<Title renamed by MOD>

TOPICS
How to , Scripting , Sync and storage

Views

341

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
New Here ,
Oct 31, 2024 Oct 31, 2024

Copy link to clipboard

Copied

Sure, both users can run the scripts simultaneously

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 ,
Oct 31, 2024 Oct 31, 2024

Copy link to clipboard

Copied

Are you replying to yourself? 

 

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
New Here ,
Oct 31, 2024 Oct 31, 2024

Copy link to clipboard

Copied

Sorry, it seems there is no button `Edit`, so my 2nd msg was just an update.

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 ,
Oct 31, 2024 Oct 31, 2024

Copy link to clipboard

Copied

yes, the script just has to check the user identity and then use the desired units. depending on your workflow, the script will check either user name or some other markers that identify the user under your particular setup.

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
New Here ,
Nov 01, 2024 Nov 01, 2024

Copy link to clipboard

Copied

Let me explain.

I'd like that the following  should be local to each script and not global for all scripts:
app.scriptPreferences.measurementUnit = MeasurementUnits.MILLIMETERS;
app.documents.add();

Is it possible?

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 ,
Nov 01, 2024 Nov 01, 2024

Copy link to clipboard

Copied

@mikeb65293881

 

You can have startup scripts.

 

But Server version is more based on instances than users. 

 

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 ,
Nov 01, 2024 Nov 01, 2024

Copy link to clipboard

Copied

Hi @mikeb65293881 ,

will document.viewPreferences.measurementUnit work for your environment?

 

Regards,
Uwe Laubender
( Adobe Community Expert )

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
New Here ,
Nov 01, 2024 Nov 01, 2024

Copy link to clipboard

Copied

yes, it works, but what's about documents.add?
In my workflow few INDDs to be opened, updated, created resulted INDD and finally all docs to be closed.
Sometimes it takes up to few minutes to complete.
Now imagine that the other user runs the same script. All doc's indecies is just a mess. 
I need a way how to resolve the task.

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 ,
Nov 01, 2024 Nov 01, 2024

Copy link to clipboard

Copied

@mikeb65293881

 

Like I've said already - Start-up Scripts.

 

Or just execute some script before / right after opening document.

 

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 ,
Nov 02, 2024 Nov 02, 2024

Copy link to clipboard

Copied

@mikeb65293881 said: "yes, it works, but what's about documents.add?"

 

Hi Mike,

hm. Will the code below work for you on InDesign Server ?

It does on InDesign Desktop:

var doc = app.documents.add
(
	{

		viewPreferences :
		{ 
			horizontalMeasurementUnits :  MeasurementUnits.PIXELS ,
			verticalMeasurementUnits : MeasurementUnits.PIXELS ,
			strokeMeasurementUnits : MeasurementUnits.MILLIMETERS

			// There are some more…
		}
	}
);

 

Regards,
Uwe Laubender
( Adobe Community Expert )

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
New Here ,
Nov 04, 2024 Nov 04, 2024

Copy link to clipboard

Copied

LATEST

Yes, thank you!

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