×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Visual Basic 6.0 and AutoCAD
2

Visual Basic 6.0 and AutoCAD

Visual Basic 6.0 and AutoCAD

(OP)
I am currently working on a project where we are updating an old program that generates terrible drawings as a dxf file.  I want to rewrite this process so it will generate a dxf & dwg file using variables supplied by a Database via VB.  People outside the company use the dxf and inside we use dwg.  I need help on where to really start and prove this is the way to go.  Thanks in advance!

RE: Visual Basic 6.0 and AutoCAD

I assume that you want to create new drawings based on values in the database. This is real easy to do using VB for AutoCAD. Using VB, you can read the database, process necessary calculations, open AutoCAD, create completely detailed drawings, save and move on. One of my AutoCAD programs creates up to 24 detailed drawings, complete with balloons and BOMs. I am sure that you can save the drawings as dxf through automation as well. Since your question is rather generic in nature, I am not real sure what information you are looking for at this point in your investigation.

If you are using VB, or VBA in AutoCAD for that matter, you can browse the AutoCAD object library to see the objects, methods and properties available in the API. The AutoCAD help also contains some good examples. There is also a comprehensive book that I have found useful entitled AutoCAD 2000 VBA Programmers Reference by Joe Sutphin.

If you have any specific programming questions or need some sample code to get you started, please post the questions in the AutoCAD forum. I think that other members would get more use out of it there.

Hope this helps!

DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.

RE: Visual Basic 6.0 and AutoCAD

(OP)
Thank you for your reply.  This is partially what I need to know.  I will be using VB mostly, maybe some VBA for users after the fact.  Can you create the drawings without opening AutoCAD?  What I mean is that with a DXF you can just write to a file and read it in later.  Is this possible with a dwg?  Thanks again.

RE: Visual Basic 6.0 and AutoCAD

I have never tried to create a dxf from a flat file. I assume it is possible if you know the dxf format. I would imagine that creating a dwg file this way would be significantly harder. While I am somewhat familiar with the contents of a dxf file, all of my programs create drawings in the AutoCAD application itself.

DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.

RE: Visual Basic 6.0 and AutoCAD

You can get (not free) ActiveX controls that can do it.
Take a look at http://www.opendwg.org/

RE: Visual Basic 6.0 and AutoCAD

I've done a couple of projects in VB creating DXF files from user input (2D only).  It's not hard if you've got the published DXF file format specification (which is usually in the AuotCAD help files).  To make a DWG I just pass the finished DXF through "Dconvert" which is on the OpenDWG Alliance web site ( www.opendwg.org ).

RE: Visual Basic 6.0 and AutoCAD

I use a cad program at work (CADDIE 8, a South African product), and the program can export drawings as an Ascii  file. I am learning to program, and would like to know if it is generally possible to manipulate such files as a data base, and then export them back to the CAD program. And if so, what are the pitfalls of such a process.  Thanking you in advance

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close