Skip to main content
Participant
February 7, 2019
Question

Selecting area based on artboard bounds

  • February 7, 2019
  • 1 reply
  • 399 views

Is there a way with a script to select all objects on an artboard, fit the artboard to those objects, then exclude from that selection any objects that are within a specified distance from the new perimeter of the artboard? Or really anything that gets me closer to this as an end result?

For instance, I have a number of paths/objects in the center of my artboard that I would like to select but have registration marks and notes within a 1/2" from the edge of the artboard, could I select these interior objects and leave out the registration marks with a script?

I have found a few scripts that can search and select by element size/appearance but not any that select based on artboard boundaries. Not sure if this is even possible.

Thank you!

This topic has been closed for replies.

1 reply

Disposition_Dev
Legend
February 7, 2019

It's certainly possible to do what you're asking for, but extremely unlikely you'll find a readymade script to do so. Do you have any code put together so far that you'd like to ask questions about or get some guidance? Or would you like to have someone write it for you?

Participant
February 7, 2019

My first hope was to see if it was possible to even perform the action, so thank you! My second hope was to see if anyone knew of any script or snippet that was already available so I didn't need to start from scratch even if it wasn't exactly performing any of the sequences of functions I was describing.

I don't have anything yet but am going to attempt to cobble something together using some existing scripts now knowing that it is at least possible. I'm newer to the scripting side of illustrator so I'm just experimenting with other user's scripts at the moment.

Disposition_Dev
Legend
February 7, 2019

Awesome! i LOVE seeing new people come around here with an interest in learning this stuff. Do you have any JavaScript experience as yet? Or any other language is great too. the most difficult part of getting started is just identifying and learning the necessary logical skills.. the basics like variables, loops, conditionals and functions. Once you're comfortable with those skills, the next step is to write yourself some pseudo-code. That's a really important step that i wish i had heeded when i was first getting started. Write out what you want your script to do in plain english, but structure/format it into logical blocks like you will eventually write your code. This will help you organize your thoughts and identify potential issues before you get bogged down in the details and syntax and all that.

Then once you have your pseudo code written, you can tackle it one small piece at a time. That will help you to understand the code as you're writing it because it's in smaller more manageable chunks. and it will also help a ton when you need to ask questions. Since you will have a clearly defined goal for that particular portion of your script.

Hope this was helpful. Please do come back with whatever questions you come up with. =)