Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Inputting values into an Autocad drawing.

Status
Not open for further replies.

RZillmer

Programmer
Nov 20, 2001
42
US
I'm a computer programmer and haven't used Autocad a day of my life, but have been charged with finding the answer to this problem.

Is it possible to make .dwg files that have blank fields on them...and those blank fields are populated from information from another file (.txt or otherwise)?

Basically, what we are trying to do is collect information in another application and find a way to get the necessary information onto our drawing. This information will change every time the application is run. Ultimately, it would be nice to auto-save a new .dwg file with the information inserted and leave the template drawing intact to be used again.

Thanks in advance for any help.
 
Depending on the programming language you are familiar with, there are a few ways to do this in AutoCAD. AutoCAD has the ability to store information in objects as Xdata. In VB, you would attach the data to an object. You can recall it later by another method call. You can also have an object in AutoCAD and store information in it. The most common way I've seen is to create a BlockReference of a titleblock and have the titleblock contain AttributeDefinitions which can be edited. You can have the attribute be invisible or visible, whatever you like. These are a couple of ways. Is this the kind of information that you are looking for?
 
You are definitely on the right track. I wish I could use VB as I'm pretty familiar with that. My problem is that I am trying to populate this autocad dwg with info I'm getting in an ERP program that is really limited in what it will let me do programmatically. It lets me customize things using ProvideX (a language I'm just now learning) code in little snippets. I'm not sure what functionality I have in terms of sending data to other programs.
 
First, what is already in the drawings that you are referring to?
Do they contain titleblocks that have the information you would want to edit or would you need to add information that is not contained anywhere else?
What I am getting at, if they all have a titleblock that is basically the same in every drawing, then you can store the information there (in the same format each time) and can use it over and over again in new drawings and retrieve it with similar function calls.
 
They are values that are not anywhere else and are unique.

Specifically, we have drawings that are not to scale and have blanks where dimensions are filled in. These dimensions are gathered in our order entry program and are unique to each order. I'd like to someone get this information to autocad drawing and print it off.
 
If you leave your email address, I can get back to you and we can exchange the dwg files to look at.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top