home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1997
/
ARCHIVE_97.iso
/
text
/
hints
/
vol_03
/
issue_03
< prev
next >
Wrap
Text File
|
1995-02-16
|
9KB
|
227 lines
Å AutoCAD to !Draw conversion Ö The RISC-OS application !Draw can
accept input from a DXF (Drawing Interchange Format) file. These files
can be produced by packages such as ÉAutoSketchæ and ÉAutoCADæ. To get a
file from a IBM PC running the ÉAutoCADæ package to !Draw the following
procedure should be used.
On the IBM PC:
1. Do a ÉDXFOUTæ command from within Auto-CAD to output the current
file in DXF format.
2. This file should be copied to a IBM format 5.25ö or 3.5ò disc.
On the Archimedes:
3. Start the PC emulator on the Archimedes.
3.3
4. Perform a Éputfile MS_DOS_Name.dxf ADFS_Nameæ from within the
emulator to transfer the file from MS-DOS to RISC-OS.
3.3
5. From within RISC-OS set the file type of your file to &DEA
(*SETTYPE ADFSName DEA).
3.3
6. Start !Draw and drag the DXF file to its icon or into a !Draw
window.
3.3
!Draw will ask you a question about the Éunitsæ (scale) before redrawing
the image in the window. This may require some thought to get the
required effect. !Draw appears to get confused with some entries in DXF
files and refuse to load the file. Deleting the text in the original
picture may cure the problem. AutoSketch on the Archimedes can also
produce DXF type files for input into !Draw.
3.3
Å ÉCæ Operating System calls (contæd) Ö The following example program
shows how system commands can be invoked from a C-program. It was tested
under Acorn ANSI C version 2. The use of the function Ésystemæ is part
of the proposed ANSI standard for C, although its exact implement-ation
is left up to the individual versions of C. The Acorn ÉANSI Cæ library
function Ésystemæ returns a zero value if the command executes success
fully and non-zero if it fails. Problems will occur if the command being
executed over-writes the C-prog-ram (for example if the command starts
up a second C-program), but in the example both commands are Ébuilt-inæ
and therefore do not overwrite the invok-ing program. In theory, the
*RMLoad command fails if there is not enough RMA, but in testing the
example, it worked even when the free RMA was configured to 0k.
3.3
/* > c.systest */
3.3
#include <stdlib.h> /* General
3.3
utilities */
3.3
#include <stdio.h> /* Input/output
3.3
*/
3.3
int main ()
3.3
{3 .3
static char rmload[]=örmload
3.3
system:modules.memallocö;
3.3
static char screensave[]=
3.3
öscreensave screenfileò;
3.3
int result1,result2;
3.3
result1=system(rmload);
3.3
result2=system(screensave);
3.3
printf(öResult1=%d, Result2=%d\nò
3.3
,result1,result2);
3.3
return(0);
3.3
}
3.3
Å Dead modules Ö If you install a module which claims a vector and
then press the reset button, something very strange happens when you
want to *RMKill the module. Because the vector canæt be released, the
module isnæt killed properly. To let you know about this, RISC-OS puts
the dummy address DEADDEAD where you would expect the workspace address:
3.3
*rmkill printkill
3.3
Bad vector release
3.3
*modules
3.3
No Position Workspace Name
3.3
1 0380873C 00000000 UtilityModule
3.3
2 0381FB94 01800014 FileSwitch
3.3
...
3.3
27 0387EA48 00000000 SpriteUtils
3.3
28 01813BC4 DEADDEAD PrintKey
3.3
etc
3.3
Å Definitive modem connections? The following connections work with
ArcTerm601, Hearsay and the Archive BBS for the WS3000 and SM2400
modems:
3.3
Arc RX (2) to Modem TX (3)
3.3
Arc TX (3) to Modem RX (2)
3.3
Arc GND (5) to Modem GND (7, not 1)
3.3
Arc RI (9) to Modem DCD (8)
3.3
Arc CTS (8), DCD (1), and DTR(4) to Modem DTR (20)
3.3
Arc RTS (7) to Modem RTS (4)
3.3
Arc DSR (6) to Modem CTS (5)
3.3
Å Digitisers? Who needs one, anyway ? We recently faced the problem of
how to get the company logo into a DRAW file, and came up with a
solution which may be useful to other people. It is most applicable to
images bounded largely by straight lines.
3.3
First take the image and enlarge it repeatedly using a photocopier until
it fills more than a third of the screen of the monitor you are using.
Then make one more enlargement, onto the transparent acetate sheets used
for overhead projector foils. If you do not have a copier you will find
most high street copier services can do all this for you, probably for
less than a pound. Our copier will enlarge to 145% at a time.
3.3
Now cut out the piece of acetate showing the image, and put it on your
monitor screen. You will find it sticks most satisfyingly. Enter DRAW
and register the coordinates of the corners of the image. You may want
to have a grid on the screen to ensure you line up the acetate image
with the edges of the screen. You can also check alignment by reading
the coordinates of points which should be the same distance from an edge
of the screen and adjusting them as necessary.
3.3
We found this was much easier than transcribing even simple shapes by
eye, as it was hard to get the proportions right that way. It was also
much quicker than drawing a grid and transcribing coordinates from that.
Laurie van Someren, Aleph One Ltd
3.3
Å Interdictor Flight Recorder! Ö It is possible to fly the plane on
your own, run or even record a demo flight. This can be done by altering
the !Run file in the !Interdictor directory. On the bottom line of this
directory is the Éflyæ command. Its permutations are as follows:
3.3
fly (just fly the plane as usual)
3.3
fly playback <filename> (replay a demo flight from a file)
3.3
fly record <filename> (record the flight to a file)
3.3
If you want an example of how this works, you can look at the !RunDemo
file in the Interdictor direct-ory. This file runs the demo file call
DemoFlight.
3.3
Å Low Batteries? One reader noticed that after 15 months, his
Archimedesæ configuration settings began to change inexplicably e.g. the
loss of all disc drive icons in the desktop. Eventually, after various
problems (e.g. the Beebug Serial Link buffer setting kept changing) the
whole system finally froze. However, the problem was fully resolved by
replac-ing the batteries. So be warned. (Acorn recommend replacement
every 12 months.)
3.3
Å MS-DOS Hard Disc Partitions Ö The easiest way of getting two hard
disc partitions for the PC Emulator is to get version 1.33, which can be
downloaded from the Archive BBS or SID. Alternatively send us a donation
to our charity pot along with an 800k formatted 3.5ö disc.
3.3
Å Multi-tasking First Word Plus? If you rename the !Run file in the
!1stWord+ directory to !Boot then First Word Plus becomes multitasking.
Unfortunately, you cannot reach the disc, palette or task icons.
3.3
Å Noisy Fans 1 Ö If you have a fan in your Archim-edes, you should not
disconnect it. The reason for this is that the fan will then be blocking
up the air vent and so the computeræs PSU will operate at too high a
temperature. If you want to reduce the noise of the fan, you should
either completely remove the fan or refer to the following hint.
3.3
Å Noisy Fans 2 Ö I have looked at the physical design of the Archi
medes PSU and done a few temperature measurements and it is my belief
that you ought to have a fan fitted and working. So, what can you do to
reduce the annoying noise of the fans? Well, we have several Archimidi
here and the noise drove us to distraction so, being hardware oriented,
I looked at the infernal (sic) fan. Yes, I have found a way of shutting
it up, but before you get too excited, allow me to explain a little
more.
3.3
These fans are most certainly not your average Scalectrix car 12volt
motor with a set of plastic blades stuck on the front! In fact, we
couldnæt have wished for a better headache Ö these fans (of which weæve
even found two different manufacturers so far) consist of a transistor
circuit driving a coil assembly that is alternately fluxing a permanent
magnet within the plastic rotor. At the same time, the rotor is having
its rotational speed monitored by a hall effect switch, busily counting
the revolutions! How are we going to slow that down? The answer we came
up with was a small transistor circuit of our own that takes the 12v
D.C. input and feeds to the fan a suitably pulsed supply that allows the
fan to start but not reach full speed. Cunning, eh?!
3.3
Yes, we had to make two slightly different versions of our circuit, as
the fans were not the same electrically. Weæll let you know how they get
on as weære still testing them, but there no problems so far. Ray
Maidstone.
3.3
If you want more technical info, drop Ray a line via the Archive office.
Ed.
3.3
Å Presenter II Stacked Bar option Ö If one of the data sets (columns)
contains several NULL (0 or zero) entries then on the display, some of
the stack-ed bar may be displaced vertically downwards. This is easily
corrected by replacing the NULL entry with a very small value. E.g., if
the data maximum is 100 then a value of 0.1 or 0.05 will do the trick.
3.3
Å Second floppy disk drive Ö If you want a second disc drive and donæt
need the a new front fascia for two drives, you can install an NEC 1036A
into the Archimedes, which can be obtained for around ú50.
3.3
You will also need to buy some ribbon cable, power leads and extra plugs
for the leads. Donæt forget to set the drive to operate as drive 1 and
to *Configure Floppies 2 on the Archimedes.
3.3