1 Reply Latest reply on Oct 6, 2014 5:17 AM by A. Patterson

    Draw a copy of a path in a second layer


      Hi all,


      a common trick in cartography is to draw the same road in two layers, one to display the black border of the road with a bigger stroke and one to draw top color (e.g. withe or yellow). This allows to create perfect crossroads between streets of different classes or to differentiate bridges from crossroads.


      I'm new to Illustrator SDK but my idea is to automate this task "extending" the pen tool by duplicating the path being drawn in a second layer. If possible this should be live.



      Does anyone think that this is possible?


      Thanks in advice,


        • 1. Re: Draw a copy of a path in a second layer
          A. Patterson Level 4

          It depends on what you mean by 'extend'. There is nothing in the SDK that lets you 'add on' to an existing tool. That said, you could probably monitor artboard changes and check if the pen tool (or some other tool) was active and then perform a copy based on the art selection. That's about the only way you could do it I think, because the SDK provides nothing helpful in the slightest about changes to the artboard beyond 'something has changed'. This means you need to use tricks to narrow the focus, but I believe the approach I just outlined might work.