Jump to content

Autolisp Program to Calculate Weight


Recommended Posts

I have thousands of sketches in autocad and need to calculate the weight for each sketch. The sketches are all in 2D format. The sketches are of shafts with different diameters and lengths. Each shaft has a major diameter and then a varying number of steps each with its own diameter and length. The dimensions of most of the sketches are associated to objects in the sketch; however, there are some sketches with non-associative dimensions.


Is it possible to write an AutoLisp program to go through all of these sketches and pull the diameter & length of each shaft (including each diameter and length of each journal step) and then use the information to calculate volume and weight.



Currently, I have an excel program that will calculate the weight if I type in all the length and diameter dimensions of the objects. The task is repetitive and time consuming. Writing a program may help expedite the task. Any advice would be helpful. Thanks

Link to comment
Share on other sites

Welcome to CADTutor. :)


Are you aware that you are unable to use lisp with LT?

Is your profile accurate, and are you working on LT?

Can you post an example of one of your typical .dwg files?

If so, just create a copy of one of them, and delete any proprietary information, it would make it much easier to help you.


I just noticed that you posted this in the CHAT forum, it would have been better placed in the LISP forum, thus ensuring that the lisperati see it.

Edited by Dadgad
Link to comment
Share on other sites

  • 8 months later...




I have thousands of drawing similar to the drawing above. Would it be possible to write a lisp to find the weight of all the drawings. Currently, we are using excel to manually type in each dimension and calculate the weight. Thanks for any help.

Link to comment
Share on other sites

Your Profile says you are using AutoCAD LT. Is that correct? If the answer is "yes" then you can forget about it as LT does not support the use of lisp which is exactly what you were told back in July of last year by Dadgad.

Edited by ReMark
Link to comment
Share on other sites

Do you have an actual 3D Solid of these? If not you will need something that can calculate all of the dimensions to obtain the mass.


Do you have access to Full AutoCAD?

Link to comment
Share on other sites

Wow a big challenge "who let the dogs out and forgot to shut the gate"


Anyway one possible way lets ignore LT and concentrate on autocad using Bpoly make a boundary of the outside shape, cut it in half and revolve it 360, gives total volume, but then need deduct keys and center marks for a more accurate answer.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...