Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

QBasic, C, C+, C++, VB...what to use for dxf files

Status
Not open for further replies.

williedawg

Mechanical
Jan 19, 2009
152
Years ago, I used QBasic to create dxf files (actually I started with GW-Basic, then went to Basic.....which gives you an idea of what is meant by "Years ago,")
Later, I had good results using QBasic.
The problem (now) is that QBasic doesn't seem too happy in WinXP environment and you're pretty much stuck with a smallish window in which to work.
Also, QBasic's print command only works with LPT1. Beings almost everything is USB connected anymore, that presents a problem too. To save a printable copy of the code, I've tried copying and pasting the code into Word, but that doesn't work either.
For a while I had Borland C++ on my computer and was able to use it for this type of code to generate dxf; but for some reason, (which I've forgotten) the C++ compiler was not performing as it once had, so I dumped it.


So, with those strikes against QBasic and still occasionally have a need to make dxf files, what program would do the somewhat basic math with loops, subs, etc to do this?
The kinds of dxf files would be, for instance, involute gear profile (POLYLINE), point-to-point X,Y coordinates for transition polylines between straights and common radii (also POLYLINES), and other line segments.

I downloaded MS's free Visual Basic and went through some tutorials, but it seems overkill and much too complicated.

Did some online reading about Borlands free C++ and seems one site (Embarcadero) had user's comments about trouble with registering and activating the software.
Another site (Sofotex) didn't have the same kind of feedback, so that might be the place to go.

Opinions anyone?

Thanks
 
Replies continue below

Recommended for you

You may just need to find an updated basic program, I'd think any would have the ability to write to a file.

Here's a basic freeware you could check out:


Can you create the involutes/etc. directly in a CAD program, then you'd have a dxf file as well?
ProGE cad (Intellicad) has had free downloads, may only have 30 day trial versions now.
 
Normally I use VB5 (or 6) to create DXF files.
But I have used PHP just adapting the VB code for a web based application. After all, at the end of the day DXF file are just text files. The trick is knowing the DXF file format so the text makes sense to the CAD programme.
 
I have found the programming language provided by microsoft excel very powerful and similar to basic. Easy to embed into other programs. I used Borland Pascal for years but I think the company ran out of steam (sorry if I am wrong) and ceased to be compatible with much of today's technology.

If I wrote a DXF file of co-ordinates and copied them into, say, AutoCAD; AutoCAD would plot the co-ordinates into a DWG file?
 
I also used Borland Turbo Pascal way back to create dxf files but that was pre-windows with version 9 and 10 Autocad. If you can master the dxf format, it really isn't that difficult. Not sure why printing would be an issue, ascii files can be printed with nearly any program. There should be no problem using Word to do this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor