AutoCAD/formulas in blocks

Advertisement


Question
hi im very new to this so sorry if i waste your time. i was wondering if you could do a simple formula in a block. at the moment i have a block that contains 2 attributes, air flow and area. the thing i was wondering if i could do was multiply the area by a number to get my air flow eg: area*3=airflow
50*3=150
if you know of any thing that would be great
thanks

Answer
Matt:  A LISP routine can be written so that if a block that has been inserted has two attributes:  one for area and the other for the flow.  You would click on the area, and from the value therein, AutoLISP would multiply the value therein by a constant (3), and you would then click on the other attribute and it would be edited with a value equal to the product of the two numbers.  If the block doesn't get picked, it would then insert the block and prompt you for the area or even ask you to pick a polyline from which the area could be calculated.  Then it would insert the block at the point you pick and fill in the attributes based on the area either given or detected.

It would take time for me to write a routine like this, but I could do it, but "free" is not my price.  Your best bet is to talk to somebody at work (if you don't work alone, that is) about either allowing you the time to write the routine, or to write the routine for you.  If you work for yourself, then it's up to you if you think the routine would save you enough time.  I think you could even program a menu button with diesel to help you in this effort.

Let me know if you think I can help you.
Keep in touch
Bill DeShawn
http://my.sterling.net/~bdeshawn  

AutoCAD

All Answers


Answers by Expert:


Ask Experts

Volunteer


Bill DeShawn

Expertise

I can address all 2-D questions and some 3-D questions. I do programming in AutoLISP if it doesn`t involve solid modeling. I can also address menu customization issues and can help you find answers to questions I can`t answer by taking your question directly to Autodesk via their newsgroups.

Experience

I used to do electronic and mechanical design for a flat panel monitor manufacturer, and now I do architectural drafting for an architect. I did and do AutoLISP and menu customization and take pride in making my lisp routines to do the work exactly the way the client likes them done.

Publications
I had a routine published in CADENCE magazine (no longer in publication and taken over by CADALYST). Some of my routines are published on my website at http://my.sterling.net/~bdeshawn

©2012 About.com, a part of The New York Times Company. All rights reserved.