Results 1 to 4 of 4

Thread: LISP Routine for volume & weights of 3D Solids

  1. #1
    Member
    Join Date
    2001-10
    Posts
    2
    Login to Give a bone
    0

    Default LISP Routine for volume & weights of 3D Solids

    We know that we can get the mass/volume of a 3D object in AutoCAD using the massprop tool. We know that in order to determine what the weight of the solid would be is to multiply the volume times the density of the material that the solid represents. Jeffry Sanders posted on his website a LISP routine he created that would report the weight via DCL by selecting from various materials and selecting a 2D area then providing input for thickness of material. This is a nice routine, however I could really use a similar routine for just selecting a 3D Solid Object, no 2D area or thickness. I'd like the same interface of setting units and selecting materials. I have reached out to Jeffry Sanders via jps@jefferypsanders.com several times with no response. Attached zip contains the original .lsp and .dcl files and a pdf showing the interface and describing what I'd like to see. An even better setup would be for the routine to use a separate list file for the materials, that way I could easily update the materials as needed. I am not good enough with LISP to make such a modification, can anyone modify the original files for me to accomplish what I am looking for?
    Attached Files Attached Files

  2. #2
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    560
    Login to Give a bone
    0

    Default Re: LISP Routine for volume & weights of 3D Solids

    Its so easy so multiply by your material density.

    Code:
    (setq obj (vlax-ename->vla-object (car (entsel "pick object "))))
    (setq vol (* (vlax-get Obj 'volume) matdense))

  3. #3
    Past Vice President / AUGI Volunteer peter's Avatar
    Join Date
    2000-09
    Location
    Honolulu HI
    Posts
    1,109
    Login to Give a bone
    0

    Default Re: LISP Routine for volume & weights of 3D Solids

    I have a routine that allows the user to enter densities to materials in a dialog and select solids or blocks with nested solids and calculate the weight and centroid of the assembly.

    If you like I can share it with you if you send me a personal message with your email address.
    AutomateCAD

  4. #4
    Member
    Join Date
    2018-07
    Posts
    13
    Login to Give a bone
    0

    Default Re: LISP Routine for volume & weights of 3D Solids

    Quote Originally Posted by mishman View Post
    We know that we can get the mass/volume of a 3D object in AutoCAD using the massprop tool. We know that in order to determine what the weight of the solid would be is to multiply the volume times the density of the material that the solid represents. Jeffry Sanders posted on his website a LISP routine he created that would report the weight via DCL by selecting from various materials and selecting a 2D area then providing input for thickness of material. This is a nice routine, however I could really use a similar routine for just selecting a 3D Solid Object, no 2D area or thickness. I'd like the same interface of setting units and selecting materials. I have reached out to Jeffry Sanders via jps@jefferypsanders.com several times with no response. Attached zip contains the original .lsp and .dcl files and a pdf showing the interface and describing what I'd like to see. An even better setup would be for the routine to use a separate list file for the materials, that way I could easily update the materials as needed. I am not good enough with LISP to make such a modification, can anyone modify the original files for me to accomplish what I am looking for?
    Use this: 3DSolidBox

Similar Threads

  1. Replies: 3
    Last Post: 2017-11-17, 06:06 PM
  2. Replies: 2
    Last Post: 2015-09-11, 08:57 PM
  3. 2014: Microstation Solids to Autocad Solids
    By boyerd492098 in forum AutoCAD General
    Replies: 3
    Last Post: 2014-05-28, 05:14 PM
  4. Lisp routine in a Lisp routine
    By jayhay35365091 in forum AutoLISP
    Replies: 8
    Last Post: 2013-10-09, 02:30 PM
  5. Run Lisp Routine From Another Lisp Routine
    By mwilson in forum AutoLISP
    Replies: 7
    Last Post: 2013-07-25, 02:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •