The PSION Organiser II Homepage
Forum Home Forum Home Help Help Search Search Members Members Login Login Register Register

Welcome, Guest. Please Login or Register.
Why register?
   The Psion Organiser II Forum
   User Forum
   User Post
(Moderator: Mikesan)
   Responding to General - AUTOCUBE
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Responding to General - AUTOCUBE  (Read 284 times)
MartinReid
Power Member




   
WWW

Posts: 78
Responding to General - AUTOCUBE
« on: Jul 16th, 2017, 5:11pm »
Quote Quote Modify Modify

Mikesan
 
Regarding
General Section "Does anyone remember AutoCube?"
 
"I don't recall it, but it sounds interesting.  What did it do exactly?  Why "..cube"?"
 
------
I've posted my response here, I can't attached the ZIP if I click 'reply' to the original post.
------
 
Why Cube? Timber is measured and sold in Cubic Metres (feet and some cases inches)
 
Companies use spreadsheets to calculate the volume in cubic metres from the Quantity x Length x Width x Thickness. When we wrote these spreadsheets we usually called then CUBE or CutLst
 
Just for fun I thought I'd have another go in OPL.
 
There is a txt in the CUBE.ZIP for anyone that wants to try it.
 
Sincerely
Martin Reid
CUBE.zip 4.8 kb
Mikesan
Administrator




   
WWW

Posts: 217
Re: Responding to General - AUTOCUBE
« Reply #1 on: Jul 17th, 2017, 1:14pm »
Quote Quote Modify Modify

Thanks, Martin, a very nice little calculation utility - exactly what the Organiser II is best at!
 
This is an LZ program, BTW.
 
I haven't tested everything to the max, just ran it on the Psion Developer (on Win 7 64 Pro you can run this under Virtual XP), but I've made some notes and a correction.
 
Select the 'CUBE' option to begin entering measurements.
 
The program is simple to use as far as I went by just inputting a list of different values.
 
The way it works is that it waits for an input and if that is a ZERO, it quits the input routine.  Otherwise, it takes the next quantity, then length, width and height then the next input, etc, etc, all the while updating the total volume at the top right of the display.
 
Firstly, we see the "*****" that happens when a string is too wide for FIX$ width on the Length field in OPL.  I found this to be in CUBESCN.OPL and on my copy, I altered Lgth$=FIX$(lgth,3,-5) to become Lgth$=FIX$(lgth,2,-5) as most people will not need to work to three decimal places.  The display now behaves when this is altered in the code.
 
The 'Look' function from the top menu allows you to review your input list for the file that you are working on.  Use the Up & Down keys and either Clear/On or EXE to go back to the menu.
 
The 'Dir' function uses the arrow keys to move through the list of files and other keys are on screen.
 
'Open' works as you'd imagine.
MartinReid
Power Member




   
WWW

Posts: 78
Re: Responding to General - AUTOCUBE
« Reply #2 on: Jul 17th, 2017, 2:46pm »
Quote Quote Modify Modify

Dear Mike (and others interested)
 
You need to have 3 decimal places in these calculations otherwise you can't get your 3/4" or 1" boards in to the calculations (0.018 and 0.025m). The width and thickness values are keyboard entered in mm then converted to metres for the volume calculation. I could have done (and have done in other situations) is error check the input value to ensure it is in the range.
 
FIX$(3,-5) because you can't buy anything close to 9.999m (10m = 30'-0"). If you have 120 metres worth of timber to enter you would enter their values [Qty] 40 [Length] 3.000 for example
 
Anyway, So what I should have done is keep FIX$(3,-5) and check
QTY > 0 and is an integer (remember if zero = return)
Length is >1 and <10 and rounded to 3 decimal places
Width (will be entered in millimetres) so >0 and <999 and is an integer
Thickness (ditto)
 
Anyway glad you looked at it, I just got the urge when I read Jamie's message about AutoCUBE.
 
Sincerely and in good faith
Martin Reid
Mikesan
Administrator




   
WWW

Posts: 217
Re: Responding to General - AUTOCUBE
« Reply #3 on: Jul 17th, 2017, 4:09pm »
Quote Quote Modify Modify

Ah ha! So I stand corrected!
 
Well thank you for explaining this and I'm sure that people on the forum will play with it and probably end up adapting it to their own needs.
 
It makes me think back to the days when I was going to try and write a program that works out what cubic space you need for a quantity boxes of the different sizes that you enter.  This is typically the sort of problem that you have when trying to stack a van or lorry.
« Last Edit: Jul 17th, 2017, 4:15pm by Mikesan »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

The Psion Organiser II Forum » Powered by YaBB 1 Gold - SP 1.1!
YaBB 2000-2002,
Xnull. All Rights Reserved.
top