Hatch creation and calling it from block

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
woddy
Junior Member
Posts: 13
Joined: Mon Mar 05, 2018 10:44 pm

Hatch creation and calling it from block

Post by woddy » Mon Mar 26, 2018 3:06 pm

Hello again, this time i wonder how can i create a hatch by using RHatchData and RHatchEntity. Let's assume i have created circle,
var circle = new RCircleEntity (document,new RCircleData (p11,1));
how can i fullfil this circle by using RHatchEntity. Is there any example script of this?

And secondly i also wonder calling this drawing from block to my current layer. How can i insert block to my layer by scripting. Cause i need to use one block multiple times.
Thanks a lot.

riverbuoy
Senior Member
Posts: 121
Joined: Thu Oct 03, 2013 5:37 pm

Re: Hatch creation and calling it from block

Post by riverbuoy » Wed Mar 28, 2018 1:22 am

Hi woddy

There is an example script called 'Wallchart-en.js' which creates a block with a hatch colour of mid grey and inserts it multiple times into the drawing. You can find it here. ('-en' is the English version).

viewtopic.php?f=107&t=2910

Note: You need to first define a hatch boundary to create the hatch. In your case the boundary would be the circle.

Hope this helps.

Regards

riverbuoy

Post Reply

Return to “QCAD 'How Do I' Questions”