Script for hatch command

Hey guys,

Can anyone help me with a script that would work as follows:

I start with a closed curve that I have selected and I run this script.
It runs the hatch command, prompts me to select the hatch, creates the hatch and then takes the hatch that was just created and places it in a layer called “hatch” (that I had precreated) without taking me out of the layer that I presently have current – or if it does take me out of the layer that I presently have current – it returns me to the layer I had current before I ran this script :slight_smile:

Is that possible? :laughing: :hushed: :laughing:

Hi @cosmas, below is an example you could start from.

AddHatchOnLayer.py (1.1 KB)

_
c.

Thank you so much Clement. It works perfectly!!