News:

Please note new Forum URL: forum.designcad.com

Main Menu
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.

read data

Started by herbertjackson, May 29, 2013, 06:42:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

herbertjackson

If you are familiar with the basic language, then you know about the READ and DATA statements.  As you know BasicCad does not have a READ and DATA statement included, but you can simulate the READ and DATA statement.  The difference is, the DATA part is a separate file and is not part of the MICRO itself. The MICRO, using the OPEN and INPUT# commands can read the DATA file and draw lines or text.
A little while back I was asked to give my example on how to read a data file. I set in one of my programs that drew structural steel angles. Most of you who looked at this may have under stood it. If your new to the MICRO language it might have been too much, or too hard to understand.  I submitted that micro because at the time I did not have the time to show or write a better example.
I finally got a chance to write a simple example on how to do this. I tried to keep it as sample as I could with notes on what I am doing so that if you are new to the micro language you could follow it.
There are two files in ZIP form, READDATA.BSC (the micro) and SAMPLE.DTA (the data file) Both must be put into the same folder.  Just run the READDATA, when in DesignCad.  There are five drawing examples (see the clip art file).  Ok so it's not fancy, just a few lines.  If you draw things constantly, only different sizes, but too many to store in a library and have the knowhow to write a MICRO to draw these things, you can save yourself a lot of time.

herbertjackson