Jump to content

Lisp for plates weight calculator.


eyal

Recommended Posts

@DELLA MAGGIORA YANN The Lisp and the DCL file should both be in one of the AutoCAD search paths. You can see what these are in the "Files" tab of the OPTIONS command; "Support File Search Path". You can also add your own folders into the search paths by selecting "Add" on the right side.

image.png.afe21dbfabdd76c59e90d1a82957175f.png

Edited by pkenewell
Link to comment
Share on other sites

ok I put the DCL in SUPPORT and it works now, however I don't know how to put the correct units
I would like to have a drawing in millimeters, a material thickness in millimeters and a result in kilograms
and then I have a display problem, in fact the result is only partially displayed,
can you help me please I am very bad at LISP language

problem unit end size.png

Link to comment
Share on other sites

54 minutes ago, DELLA MAGGIORA YANN said:

J’ai bricscad 2024, je suppose que le principe est le même ?

Yes I believe so, but I don't have BricsCAD so I don't know for certain.

 

Link to comment
Share on other sites

23 hours ago, DELLA MAGGIORA YANN said:

I don't know how to put the correct units
I would like to have a drawing in millimeters, a material thickness in millimeters and a result in kilograms
and then I have a display problem, in fact the result is only partially displayed,
can you help me please I am very bad at LISP language

@DELLA MAGGIORA YANN I made an updated version of Jeffrey's original to allow changing the weight units to different values - give the attached a try.

 

EDIT: Updated DCL to use edit boxes for the results, which may display better in some systems.

 

WEIGHT.lsp

WEIGHT.dcl

Edited by pkenewell
Added clarification, Update Code, Corrected errors.
Link to comment
Share on other sites

EDIT: Updated my above Alteration to also use Region boundaries and subtracting islands (for example: holes in the plate) for a better way to get areas than just getting single polyline boundaries. I also added a couple more materials. I will probably go back later and localize everything, as Jeffrey's original program has NO localized variables.

Edited by pkenewell
  • Like 1
Link to comment
Share on other sites

29 minutes ago, pkenewell said:

I will probably go back later and localize everything, as Jeffrey's original program has NO localized variables.

Edited Above Again and localized all the variables.

  • Like 1
Link to comment
Share on other sites

99% of code works with Briscad. A few things but you find them, as new versions come out some of the problems go away.

 

Something I use is the convert dcl to lisp by RLX then you have only 1 file, as the dcl lives in the lsp.

Convert dcl 2 lisp rlx.lsp

  • Like 1
Link to comment
Share on other sites

Il y a 9 heures, pkenewell a dit :

Édité à nouveau ci-dessus et localisé toutes les variables.

Great work, you impress me!!!
this seems to work.
However, I have a display problem in the dialog box. In fact the results are not visible, I will provide you with a screenshot.
I have another question to make sure I understand correctly.
-1- I therefore choose milimeters because my model is in milimeters,
-2- I choose my material, “glass”
-3- I choose the weight unit “kg”
-4- I select or manually enter the surface in millimeters “mm²”
and this should give me the result of the volume and the weight?
and as I told you I can't see the results because of the display problem.
I would like to thank you for your work.

PROBLEM SCREEN.png

Link to comment
Share on other sites

6 hours ago, BIGAL said:

99% du code fonctionne avec Briscad. Quelques choses, mais vous les trouvez, au fur et à mesure que de nouvelles versions sortent, certains des problèmes disparaissent.

 

Quelque chose que j’utilise est la conversion de dcl en lisp par RLX, alors vous n’avez qu’un seul fichier, car le dcl vit dans le lsp.

Convertir dcl 2 lisp rlx.lsp 4.38 kB · 0 téléchargements

I thank you for your interest in me,
However I don't understand how it works
can you tell me wei

Link to comment
Share on other sites

8 hours ago, DELLA MAGGIORA YANN said:

this should give me the result of the volume and the weight?
and as I told you I can't see the results because of the display problem

Very Strange. It works fine in my AutoCAD. It may have something to do with your display settings. I will play around with the DCL file and see if I can get it to do something different.

Link to comment
Share on other sites

@DELLA MAGGIORA YANN OK. I made an update to the DCL in my Post above. Please re-download it and give it a try. I changed the DCL to use edit boxes for the results instead of just text labels. hopefully this will work better in your setup.

 

Example:

image.png.de7f247e6f857e3d586ffa2cdd7c0378.png

Edited by pkenewell
Link to comment
Share on other sites

OK SUPER NICE I'LL TEST THIS IN A MOMENT AGAIN THANK YOU IT'S GREAT

Edited by DELLA MAGGIORA YANN
Link to comment
Share on other sites

It's good, it works, it's great, a big thank you
just a small question if possible otherwise it doesn't matter, it can stay like that.
Do you think it is possible to put the density in kg/m3? as on screenshot keeping the units in millimeter
if it's not too complicated of course.
another thousand thanks you are great

Capture d’écran 2024-02-28 180537.png

Link to comment
Share on other sites

@DELLA MAGGIORA YANN Great! I am glad it's working for you.

 

Note - the program is completely dependant on the selected units. If you want it to show in kg/m3, just temporarily change the units at the top to "Meters" and it will update the density in real-time, then you can change it back to "millimeters" for the correct object weight to be displayed.

 

I like this program and I may revisit the program at sometime in the near future and re-write it for more features, but for now this will have to do for you.

Edited by pkenewell
  • Like 1
Link to comment
Share on other sites

  • 2 months later...
On 2/28/2024 at 11:03 PM, pkenewell said:

@DELLA MAGGIORA YANN Great! I am glad it's working for you.

 

Note - the program is completely dependant on the selected units. If you want it to show in kg/m3, just temporarily change the units at the top to "Meters" and it will update the density in real-time, then you can change it back to "millimeters" for the correct object weight to be displayed.

 

I like this program and I may revisit the program at sometime in the near future and re-write it for more features, but for now this will have to do for you.

Dear Sir,

 

Please share latest updated Lisp for plates weight calculator.

Link to comment
Share on other sites

On 5/18/2024 at 11:39 AM, SANDIP PAITAL said:

Dear Sir,

 

Please share latest updated Lisp for plates weight calculator.

They downloaded fine for me.

 

Do you get an error message trying to download them?

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.

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