# \[SOLVED\] Added lines after Addline not functional

**URL:** <http://forum.qcad.org/t/solved-added-lines-after-addline-not-functional/5045>\
**Category:** QCAD Troubleshooting and Problems\
**Created:** [December 22, 2019, 11:27am UTC](http://forum.qcad.org/t/solved-added-lines-after-addline-not-functional/5045 "2019-12-22T11:27:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CVH](http://forum.qcad.org/letter_avatar_proxy/v4/letter/c/82dd89/32.png) [@CVH](http://forum.qcad.org/u/CVH)\
**Post date:** [December 22, 2019, 11:27am UTC](http://forum.qcad.org/t/solved-added-lines-after-addline-not-functional/5045/1 "2019-12-22T11:27:55Z")

</div>

Andrew,

‘We’ are hatching these days and I pauzed flexpainter a bit.  
I have a working idea to convert Tiles into hatch patterns like John Hyslop uses in AC.  
Knowing me, its a firmly enhanced one. e\_geek

I have a external pattern that doesn’t work in Qcad:

> [@How to create a custom hatch?](http://forum.qcad.org/t/how-to-create-a-custom-hatch/4905/1):
>
> Hi I’m looking for a way to create a custom hatch with QCAD professional. Is that possible today?

Converted YUKONRUBBLE.PAT to a script drawing the line segments once.  
4533 segments are added with addLine() in one transaction.  
Script MyTool.js included.  
C:\Program Files\QCAD\scripts\Misc\MyTool\MyTool.js  
I misuse this script to fiddle around. 😊

Running the script reveals nothing.  
Select All will select segments ❗

Knowning this behaviour saved and reverted.  
And there is the rubble.

What is wrong in MyTool.js

Thanks already,  
CVH  
[MyTool.js](http://forum.qcad.org/uploads/short-url/gPVyXoJlhLnqbMy2cA50bKB8jkK.js) (229 KB)

---

<div class="post-metadata">

**Author:** ![andrew](http://forum.qcad.org/user_avatar/forum.qcad.org/andrew/32/15013_2.png) [@andrew](http://forum.qcad.org/u/andrew)\
**Post date:** [December 23, 2019, 10:49am UTC](http://forum.qcad.org/t/solved-added-lines-after-addline-not-functional/5045/2 "2019-12-23T10:49:13Z")

</div>

This seems to work fine here. The script adds the lines to the current drawing. Perhaps an autozoom after running the script does the trick? Another common problem is drawing in the background color. This depends on your color / layer preferences.

---

<div class="post-metadata">

**Author:** ![CVH](http://forum.qcad.org/letter_avatar_proxy/v4/letter/c/82dd89/32.png) [@CVH](http://forum.qcad.org/u/CVH)\
**Post date:** [December 23, 2019, 12:42pm UTC](http://forum.qcad.org/t/solved-added-lines-after-addline-not-functional/5045/3 "2019-12-23T12:42:00Z")

</div>

Running 3.23 !! Mentioned in the footer of the post.  
I know I need to upgrade to .24 but that’s always a heck of a work.  
Remember…

No, there is nothin there.  
I know they are in quadrant 4 near the origin.  
Somewhat @ 0.3,-0.1

Pointing and selecting in the void there is nothing selected.  
Snapping to, nothing but the grid.  
‘draw’ select excluding the origin. Nothing

Can add whatever I want as normal.  
Can delete this again.  
Can undo this, can undo the tool transaction.  
Can FlexPaint what uses Addline too.

Select All  
or Select Layers Entities  
or ‘draw’ select including the origin  
or simply ‘draw’ select a tiny area around the origin itself, eg. 0.01 by 0.01. ❓  
=\>  
All 4533.  
But only Start- and Endpoint indicators.  
No line segments.  
All listed in Prop Editor.  
Can set common General Props with no result.

All specific Props are obviously _VARIES_  
Except Total Lenght = NaN ❗  
Except Angle = 0 ❗

This behaviour is know to me as ‘Null-entities’.  
Save & Reverting, all fine.

😮  
Strange???

Will come back on this after wiping Qcad.

Thanks,  
Regards.

---

<div class="post-metadata">

**Author:** ![CVH](http://forum.qcad.org/letter_avatar_proxy/v4/letter/c/82dd89/32.png) [@CVH](http://forum.qcad.org/u/CVH)\
**Post date:** [December 5, 2020, 8:04am UTC](http://forum.qcad.org/t/solved-added-lines-after-addline-not-functional/5045/4 "2020-12-05T08:04:11Z")

</div>

About a year later …  
QCAD Version: 3.25.2.1

The same issue remains.  
Meanwhile, Tile2Hatch cast any \*.pat file once as segments … flawless 😃

Still, the MyTool version of YukkonRubble fails me … Win7 PRO 32bit installer ❓  
Changed it somewhat but it won’t cast in debugger.  
(Kept the beginEvent as short as possible)

[MyTool.js](http://forum.qcad.org/uploads/short-url/gMg5ThwLMx1vHvq6lwLsGBK4C6A.js) (243 KB)  
Placed in: …QCAD\scripts\Misc\MyTool\

And it won’t run afterwards in normal mode either.

The segments are there with TA (only reference points) and after Save+Revert.

BUT it will run perfect in standard mode not ran in debugger first.  
Something I picked up coding various things in the past year.

When the output fails in debugger mode don’t try it directly in Normal mode.  
Work around: Run a functional script in Normal mode first and reboot again.

I set this thread to [SOLVED] for 2 reasons:

- OBSOLETE because replaced by Tile2Hatch
- Solved because the work around

Regards,  
CVH
