[SOLVED] Added lines after Addline not functional

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
CVH
Premier Member
Posts: 3417
Joined: Wed Sep 27, 2017 4:17 pm

[SOLVED] Added lines after Addline not functional

Post by CVH » Sun Dec 22, 2019 12:27 pm

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:
https://qcad.org/rsforum/viewtopic.php?t=6678#p25300

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. :oops:

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
Attachments
MyTool.js
(228.92 KiB) Downloaded 342 times
Last edited by CVH on Sat Dec 05, 2020 9:04 am, edited 1 time in total.

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: Added lines after Addline not functional

Post by andrew » Mon Dec 23, 2019 11:49 am

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.

CVH
Premier Member
Posts: 3417
Joined: Wed Sep 27, 2017 4:17 pm

Re: Added lines after Addline not functional

Post by CVH » Mon Dec 23, 2019 1:42 pm

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.

:shock:
Strange???

Will come back on this after wiping Qcad.

Thanks,
Regards.

CVH
Premier Member
Posts: 3417
Joined: Wed Sep 27, 2017 4:17 pm

Re: Added lines after Addline not functional

Post by CVH » Sat Dec 05, 2020 9:04 am

About a year later ...
QCAD Version: 3.25.2.1

The same issue remains.
Meanwhile, Tile2Hatch cast any *.pat file once as segments .... flawless :D

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
(242.59 KiB) Downloaded 294 times
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

Post Reply

Return to “QCAD Troubleshooting and Problems”