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

convert to shape

Participant ,
May 08, 2018 May 08, 2018

Copy link to clipboard

Copied

Hi scripters;

exam.jpg

I have a lot of objects. I need to change it as follows. (Provided that the contents remain the same;)

I would be glad if you can help

TOPICS
Scripting

Views

902

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
Enthusiast ,
May 08, 2018 May 08, 2018

Copy link to clipboard

Copied

Not too sure what you are looking for here. The convert shape command converts a single item to a different shape. (1) Can be used to convert text frame to a spline item such as rectangle, oval, polygon. (2) Can be used to convert page items (rectangles, spline items, imported page, media items, groups, etc.) to another shape (convert a closed path to an open path, convert rectangle to a rounded rectangle, etc.). Your diagram would indicate combining two items into one as with a group or perhaps embedding one item inside another. Please explain.

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
Participant ,
May 08, 2018 May 08, 2018

Copy link to clipboard

Copied

Okay, explain more simply

exam.jpg

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
Guide ,
May 11, 2018 May 11, 2018

Copy link to clipboard

Copied

Just For Fun … But Not For Free!

"Tatoo" is the last script I wrote!

Capture d’écran 2018-05-12 à 01.34.25.png

The user just selects the "pattern" he created [what he wants! ] and the similar objects he wants to be tattooed! …

[I'll write later a "batch"version with UI.]

Capture d’écran 2018-05-12 à 01.35.08.png

… and he plays "Tatoo"!

Capture d’écran 2018-05-12 à 01.35.45.png

Even if Tatoo has a global undo, if the user is not satisfied by the result, he can modify the pattern or choose another one:

Capture d’écran 2018-05-12 à 01.36.18.png

… and "Tatoo" again!

Capture d’écran 2018-05-12 à 01.36.34.png

Of course, "Tatoo" loves simple shapes, ID effects and object styles! …

Capture d’écran 2018-05-12 à 01.57.56.png

Best,

Michel, from FRIdNGE

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
Enthusiast ,
May 11, 2018 May 11, 2018

Copy link to clipboard

Copied

Hi,

Sorry about the delay. I think I know what you are looking for now. What you need to do is define a path for the new shape. This takes a little calculation.  The shape created by the following is not exactly yours, but I think you can figure it out from there.

--select item to modify before running script

set numPts to 4

tell application "Adobe InDesign CC 2018"

  set measurement unit of script preferences to points

  set x to item 1 of selection

  set gBounds to geometric bounds of x

  set bhgt to (item 3 of gBounds) - (item 1 of gBounds) --calculate box height

  set bf to bhgt / (numPts * 2) --

  set z to entire path of path 1 of x --path points of original rectangle

  set bx0 to item 1 of item 3 of z --bottom right x point of original

  set by0 to item 2 of item 3 of z--bottom right y point of original

  set edgePts to {{bx0, by0}} --set up list for points on right edge

  repeat with i from 1 to numPts

  set by0 to (by0 - bf)

  set thisPt to {bx0 - bf, by0}

  set end of edgePts to thisPt

  set by0 to (by0 - bf)

  set nxtPt to {bx0, by0}

  set end of edgePts to nxtPt

  end repeat

  set newPath to {item 1 of z, item 2 of z} & edgePts --define the path points

  tell x

  set entire path of path 1 to newPath --create the new shape

  end tell

end tell

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
Participant ,
May 12, 2018 May 12, 2018

Copy link to clipboard

Copied

I don't know and do not use [as] @S Hopkins.

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
Participant ,
May 12, 2018 May 12, 2018

Copy link to clipboard

Copied

LATEST

@Michel [FRIdNGE] ​that's exactly what I want! great job.

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