DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Printing to file from BasicCad program

Started by j-wetzel, July 31, 2008, 08:59:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

j-wetzel

DesignCad 3D Max 18.2 on a MS VISTA (Business) machine (<gasp>)

What have I forgotten; these statements don't work in an otherwise working program:

     ...
     OPEN "I", 1, "C:\Project-Workspace\da-Vinci-CMJ\SW-DATA\data.txt"
     ...
     PRINT 1, "X_0 = ",X0
     ...

The (initially empty) file "data.txt" exists in the specified folder, after the program runs, apparently successfully (it draws what it is supposed to draw), the data record file remains empty.  Changing the extension to .bsc doesn't help.

Thanks for any and all help and advice!

--Jack

Dempsey

Try this:

     ...
     OPEN "O", 1, "C:\Project-Workspace\da-Vinci-CMJ\SW-DATA\data.txt"
     ...
     PRINT #1, "X_0 = ",X0
     ...
Dempsey

j-wetzel

Bingo!  You're absolutely right on the money, Dempsey.  Two errors, one stupid and one because of unclear documentation.  Thanks so much for your help!
--Jack