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.

DesignCAD command interferes with WINDOW statement

Started by Dempsey, September 01, 2008, 08:00:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dempsey

Have a look at the following piece of code:


include "DcadAlias.d3i"
'
' print output to status bar, one line at a time
'
print "OUTPUT TO STATUS BAR"
anykey
for i = 1 to 5
  print "tada:", i
  anykey
next i
'
' print output to a window, completes correctly
'
window (7,40)
print "GOOD WINDOW"
for i = 1 to 5
  print "tada:", i
next i
print "hit any key to exit"
anykey
wclose
'
' print output to a window, but after "tada: 1" the window closes and
' the rest of the output goes to the status bar
'
window (7,40)
print "BAD WINDOW"
for i = 1 to 5
  print "tada:", i
  anykey
  >Deselect
  {
  }
next i
print "hit any key to exit"
anykey
wclose
'
end


When I don't open a WINDOW then the output of PRINT statements appears on the status bar, one line at a time, provided I follow the PRINT statement with an ANYKEY statement otherwise I don't see anything. That works as documented.

When I do open a WINDOW of certain size the the output of the print statements appear in that window, and the window is closed with WCLOSE statement or macro exit. Works as documented.

However, when I add a DesignCAD command (e.g. Deselect) in the print loop then the window closes after the DesignCAD command is executed and the rest of the print statements appear again on the status bar. This is not as documented.

Am I doing something wrong, or is this a BasicCAD bug?
Dempsey

DrollTroll

Let's call it a BasicCAD limitation and a documentation error.

Documentation should be changed to read:

"As long as the text window is open, all PRINT statements are displayed in the window. The text window remains open until a WCLOSE statement is executed, a DesignCAD command is executed, or the macro terminates."
   

In all honesty, the Window statement has been of very limited utility since we leaped from the Dos platform to Windows.
25 years with DesignCAD

Dempsey

Thanks DT. Knowing the limitation I can live with it.
Dempsey