Jump to content
sander35

Autolisp Program to Calculate Weight

Recommended Posts

sander35

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

Share this post


Link to post
Share on other sites
Dadgad

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

Share this post


Link to post
Share on other sites
sander35

FORUM_EXAMPLE.pdf

 

 

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.

Share this post


Link to post
Share on other sites
ReMark

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

Share this post


Link to post
Share on other sites
SLW210

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?

Share this post


Link to post
Share on other sites
BIGAL

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.

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...