Count up counter for consecutive number labeling
Moderators: andrew, Husky, J-J
Re: Count up counter for consecutive number labeling
By rhe way, I'm using OS X on an iMac. What has to be done to get this enhancement as a permanent part of qcad?
Now I have to copy it into the right folder within the program app everytime I install a new version of qcad.
Thomas
Now I have to copy it into the right folder within the program app everytime I install a new version of qcad.
Thomas
Ich will nicht streiten. Ich will nur deutlich machen, dass ich Recht habe und DU NICHT.
Re: Count up counter for consecutive number labeling
You could politely ask Andrew ... like me.TSG wrote:What has to be done to get this enhancement as a permanent part of qcad?
Husky wrote:@Andrew
Would it be possible to have this new Counter tool permanently implemented in the QCAD "Misc" directory? I would really appreciate it.
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: Count up counter for consecutive number labeling
Husky wrote:You could politely ask Andrew ... like me.TSG wrote:What has to be done to get this enhancement as a permanent part of qcad?
Husky wrote:@Andrew
Would it be possible to have this new Counter tool permanently implemented in the QCAD "Misc" directory? I would really appreciate it.
Ok, here we go:
Andrew, would you please put the Counter Tool permanently in the QCAD "Misc" directory.
Thanks a lot
Thomas
Ich will nicht streiten. Ich will nur deutlich machen, dass ich Recht habe und DU NICHT.
Re: Count up counter for consecutive number labeling
OK, this script now lives at:
https://github.com/qcad/qcad/tree/maste ... aw/Counter
https://github.com/qcad/qcad/tree/maste ... aw/Counter
Re: Count up counter for consecutive number labeling
Very nice - thank you!
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: Count up counter for consecutive number labeling
Hi,
While learning Ecmascript, I have used a function that always prints a fixed number of digits after the decimal point. It dawned on me that this was the perfect answer to fixing the problem of showing trailing zeroes in this command. So I have altered this command. It now has a spin box labelled 'Precision', which has a minimum value of zero, and a maximum value of seventeen. (Ecmascript can display up to 17 digits of precision). The value in the box wraps around, so if it is displaying 0, and you click the down arrow, it will wrap around to 17. If it is displaying 17, and you press the up arrow, it will wrap around to 0.
You use this value to determine how many digits should appear after the decimal point. If you wish to use whole numbers, set the precision to zero. So with a start number of 1, an increment of 1, and precision of 0, this will display:-
1, 2, 3, 4, ...
If you set precision to 1, you will get:-
1.0, 2.0, 3.0, 4.0, ...
If you set precision to 2, and increment to 0.1, you will get:-
1.00, 1.10, 1.20, 1.30, ...
If you set increment to 0.01, you will get:-
1.00, 1.01, 1.02, 1.03, ... 1.09, 1.10, 1.11 ... 1.99, 2.00 ...
The thing to remember, is that the precision should be set to at least the number of digits in the increment. So if the increment is 0.001, then precision should be set to at least three.
The advantage of this, is that you no longer have to change anything in 'Drawing Preferences', when using fractional numbers.
The change affects two files, which I have attached. These should be put in the directory 'scripts/Misc/MiscDraw/Counter', replacing the existing files.
I regard this as an important update, so if you are going to be using this command, you should definitely replace these files.
Regards
riverbuoy
While learning Ecmascript, I have used a function that always prints a fixed number of digits after the decimal point. It dawned on me that this was the perfect answer to fixing the problem of showing trailing zeroes in this command. So I have altered this command. It now has a spin box labelled 'Precision', which has a minimum value of zero, and a maximum value of seventeen. (Ecmascript can display up to 17 digits of precision). The value in the box wraps around, so if it is displaying 0, and you click the down arrow, it will wrap around to 17. If it is displaying 17, and you press the up arrow, it will wrap around to 0.
You use this value to determine how many digits should appear after the decimal point. If you wish to use whole numbers, set the precision to zero. So with a start number of 1, an increment of 1, and precision of 0, this will display:-
1, 2, 3, 4, ...
If you set precision to 1, you will get:-
1.0, 2.0, 3.0, 4.0, ...
If you set precision to 2, and increment to 0.1, you will get:-
1.00, 1.10, 1.20, 1.30, ...
If you set increment to 0.01, you will get:-
1.00, 1.01, 1.02, 1.03, ... 1.09, 1.10, 1.11 ... 1.99, 2.00 ...
The thing to remember, is that the precision should be set to at least the number of digits in the increment. So if the increment is 0.001, then precision should be set to at least three.
The advantage of this, is that you no longer have to change anything in 'Drawing Preferences', when using fractional numbers.
The change affects two files, which I have attached. These should be put in the directory 'scripts/Misc/MiscDraw/Counter', replacing the existing files.
I regard this as an important update, so if you are going to be using this command, you should definitely replace these files.
Regards
riverbuoy
- Attachments
-
- Counter.ui
- (2.4 KiB) Downloaded 1264 times
-
- Counter.js
- (4.16 KiB) Downloaded 1195 times
Re: Count up counter for consecutive number labeling
Hi riverbuoy,
very nice - thank you so much for this important (at least for me!) improvement. I really appreciate it.
very nice - thank you so much for this important (at least for me!) improvement. I really appreciate it.
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: Count up counter for consecutive number labeling
Is it possible to set up a counter to automatically add up the blocks so every time i add a smoke detector to my drawing it will add to the right column
- Attachments
-
- block.png (109.49 KiB) Viewed 29744 times
Re: Count up counter for consecutive number labeling
@riverbuoy I just want to give you thanks and kudos for this. I have to number wires on a regular basis, and this is close to perfect. It's not AutoCAD electrical (No BOM or wire usage/load and Qcad doesn't support those) but it certainly makes a tedious task much more pleasant.
Thank you!
Bill J.
Thank you!
Bill J.
Re: Count up counter for consecutive number labeling
Hi,FireAlarm wrote:Is it possible to set up a counter to automatically add up the blocks so every time i add a smoke detector to my drawing it will add to the right column
I can tell you that we don't have something like that in the current QCAD Version but I can't tell you what the developers have already in the pipe ...
However - what I can tell you definitive is that the current QCAD Version has already a little simple script which will count blocks.
Maybe that is something what you can use to doublecheck your chart ...
Menu / Misk ...
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."