|
|
| Home » Knowledge Base » Knowledge Base Article | Login | Become a Member | What's New | Site Map |
|
WOODWEB DISCLAIMS any and all RESPONSIBILITY and LIABILITY for the accuracy and application of the information below. Readers agree to evaluate the significance and limitations of the information provided, and accept full responsibility for the application of this information. Read More ... |
|
|
Would you like to add information to this article? Interested in writing or submitting an article? Have a question about this article? Parametric AutoCAD drawings Question
Forum Responses
Here goes: I think AutoCAD is not parametric. You will need to go to Mechanical Desktop or Inventor for that. But I don't know if saving your parts as blocks will do the trick. To get bigger or smaller parts you just need to insert them in ratio bigger/smaller than 1.
From contributor B: If you were versed in Visual LISP you could do it. Problem is, I haven’t been able to find any “how to” books that address the subject. Recommendations, anyone? From contributor C: There are several ways to accomplish this. Keep in mind, my responses are based on how I do things. I don't use paper space; I use Visual Basic, not Lisp; etc. 1. If your drawings don't have to be to scale… You can draw the parts as you would normally. Explode the dimensions. Delete the dimensional information and insert an attribute. Use the command ATTDEF. For example, you can put in Attributes with the tags of WIDTH and DEPTH. These can be controlled by Visual Basic routines in Excel and/or AutoCAD. Think of it as a fancy charted drawing without the chart. 2. You can set up an Excel spreadsheet to control the drawing if you know Visual Basic. I really like Visual Basic compared to Lisp because then you can control various programs with similar code. You have to know what AutoCAD information needs to create the drawing object. For example, if you want to draw a line, you have to know the start point in X,Y, and Z. You have to also know the end point in X, Y, and Z. For drawings, Z is always 0. Excel is great for keeping track of and manipulating dimensional data, which you already know if you are using it to create programs. There are about a million other things that you can control - layer, linetype, scale, etc, and you can choose to manipulate them or not. Anyway, in order to do this, you have to be good at these things:
I have found that it very difficult (time consuming) to try creating a professional drawing by method two. It is better for creating a dimensionally accurate drawing. Method 1 will allow for good visual clarity at the sacrifice of perfect scale. 3. Other options are to go with a commercial package that is already written for the job. MicroVellum, Pattern Systems, Striker Systems (for sheet metal), Synthesis (general purpose parametrics) all have programs that can control AutoCAD parametrically. There are others whose names I just can't think of right now. These commercial programs are very nice, but we chose to create our own because we could integrate with our scheduling, order entry, bill of material programs easier with our own software.
From the original questioner: Thanks for the help. Contributor C, your advice was extremely helpful. I set up a drawing for a constantly varying part using your first method, and find it will be more than sufficient for this part and similar parts. Now, with the addition of two pieces of information to our Excel cutlists, we are able to create AutoCAD drawings for this part in virtually no time at all. From contributor D: I have had quite a bit of experience creating parametric drawings in AutoCAD using both Lisp and VB. It actually is pretty simple to have AutoCAD generate new geometry each time your part changes size. With Lisp you can enter your parametric values on the command line or in dialog boxes. With VBA built into AutoCAD, it is pretty easy to create a form that allows you to enter the values that will drive your parts. The help files have a lot of great examples of things like adding lines, polylines, circles, etc. Both lisp and VB have their strong points. I prefer VB myself, but, both are pretty easy to use. If you are interested in learning VBA for AutoCAD, "AutoCAD 2000 VBA Programmers Reference" by Joe Sutphin is the best reference book that I have found. It doesn't cover things like creating forms, however, it covers everything related to the AutoCAD VBA interface. VBA will also link to Excel and can be set up to automatically read data and automatically create geometry. From contributor A: Command: attdef Attribute modes - Invisible:N Constant:N Verify:N Preset:N Enter (ICVP) to change, or press ENTER when done: length Invalid option keyword. What is ICVP?
From contributor E: ICVP I=Invisible C=Constant V=Verify P=.....your turn here ;-) From contributor A: P=Preset Caught that just after I fired off that post, wanted to... but thought that someone may have further clarification to add. Ahh! Parametric for AutoCAD. That is interesting. Even Omura (of Mastering AutoCAD fame) never gave a squeak about it. Tried it - exploded dimension, deleted text, inserted attribute, but couldn't proceed further.
From contributor C: You are correct, at this point in your setup you haven't gained much. Try this: 1. Save the drawing with the two defined attributes - Width, Depth. Call this drawing TEST.DWG
This method has some usages. Titleblocks are easy to create and fill out this way, for example. However, for our purpose the only point is to show you that the dimensions now have names (TAGS in ACAD language). These TAGS can be accessed with VB commands to update them automatically as explained above. This isn't a real parametric drawing, but it has its place. Here's some VB code that will insert the block C:\TEST.DWG in a new drawing and update the Width and Depth dimensions. The code is very crude. I just wrote it to show that these things can be done. Sub updatedim()
varAtt = blockRefObj.GetAttributes mywidth = 24.375 MYNAME = "WIDTH" For t = LBound(varAtt) To UBound(varAtt) temp = varAtt(t).TagString If varAtt(t).TagString = MYNAME Then _ varAtt(t).TextString = mywidth Next t
MYNAME = "DEPTH" For t = LBound(varAtt) To UBound(varAtt) temp = varAtt(t).TagString If varAtt(t).TagString = MYNAME Then _ varAtt(t).TextString = mydepth Next t ZoomExtents
We now have two variables, MYWIDTH and MYDEPTH that we can manipulate and have the program update the drawing. Where this gets useful is not in the width and depth, but let's say you have a hole that is always in the center of the part… you can add two TAGS, HOLEX and HOLEY, then add math formulas, HOLEX = WIDTH/2 and HOLEY = DEPTH/2.
From contributor F: You guys should really try out Mechanical Desktop or Inventor. It is already parametric based. No understanding of Lisp is required. Going from AutoCAD 2000 to Desktop is like night and day. The comments below were added after this Forum discussion was archived as a Knowledge Base article (add your comment). Comment from contributor V:
Have you reviewed the related Knowledge Base areas below?
|