Mahdi_Nasr Posted September 28 Posted September 28 Hello, good day. I’d like to continue working on the material volume tables in AutoCAD — specifically the ones that have been exploded and no longer retain a defined table structure. These tables begin with a top row that contains the stationing of each section, formatted like this: Material(s) at Station 0+250.00 This first row contains only one column. The second row has four fixed columns that serve as headers for the data rows below. These headers are consistent across all sections and do not change. From left to right, they are: Material Name Area Volume Cumulative Volume The third row and all subsequent rows contain the actual data, aligned with the headers above. The material names may vary from project to project, but within a single project, they remain consistent across all sections. In the second column of each row, the area of the material is listed as a numeric value. The third column contains the volume, and the fourth column contains the cumulative volume. Since these tables have been exploded, the numbers no longer update automatically. That’s why we need a solution where, after manually updating the area values, the corresponding volumes and cumulative volumes are automatically recalculated and replaced in the table. So far, all our attempts to achieve this have failed. Now I’d like to share some insights that might help: Stationing is critical. The first step must be to extract the station number from the top row as an integer. This allows us to calculate the distance between two consecutive sections, which is essential for computing the volume of a truncated cone. Area values should remain unchanged. We only need to read them and use them in calculations to update the Volume and Cumulative Volume columns. New observation about table geometry: The vertical spacing between the second row and all subsequent rows is exactly three times the text height. Also, the insertion point (X coordinate) of the area values is exactly aligned with the insertion point of the word “Area” — and the same applies to the Volume and Cumulative Volume values. Update logic: Let’s assume we have only one material row (though usually there are more). Let’s name the area value in the first section A1, and the area in the second section A2. These two values represent the top and bottom surfaces of a truncated cone with height H, where H is the difference between the station numbers of the two sections. The calculated volume should replace the volume value in the second section. Then, this volume should be added to the cumulative volume from the first section, and the result should replace the cumulative volume in the second section. Naturally, this volume and cumulative update must follow the correct station order Quote
BIGAL Posted September 28 Posted September 28 If this is Road pavement volumes then may need CIV3D or Civil Site Design which have volume reports which include volume & area between chainages. Quote
Mahdi_Nasr Posted September 29 Author Posted September 29 (edited) these tables are produced by Civil 3D but after exporting section view , you cant updates material tables automatically. sometimes you have to change some areas manually and you need to recalculate volumes and also make corrections to cumulative volumes as well. I myself have written two separate lisps to do that but it need lots of clicks on the tables. I think it wont be very difficult for experts to define the right arrays to read source data and do recalculations and replace all volumes automatically. Edited September 29 by Mahdi_Nasr Quote
CyberAngel Posted September 29 Posted September 29 This might be a stupid question, but could it be easier to generate the table all over again? In some cases (especially with Civil 3D) it's faster to start over than to try editing the table. Quote
BIGAL Posted September 29 Posted September 29 (edited) Agree with @CyberAngel press a button and get volumes again. Yes may have to add sections in the road for change of shape. Again software like Civil Site Design allows multi string design so small sections of road can be changed and auto volumes then. Think Bus bays & turn slots. Edited September 29 by BIGAL Quote
Mahdi_Nasr Posted September 30 Author Posted September 30 there are lots of cases in which source civil 3D files are not given . then recalculating and updating the tables will be like a nightmare. Quote
EleenD03 Posted 3 hours ago Posted 3 hours ago That is a classic Civil 3D export nightmare when you don't have the source file - the pain is real. Since re-generating the table is off the table for you, a smart LISP is definitely the most robust way to solve this. It's a tricky job because the routine needs to accurately parse the stationing text and map the Area MTEXT entities to the right Volume and Cumulative Volume fields based on their coordinates. I hope one of the LISP experts can jump in and help you get that final, streamlined routine working! Quote
Recommended Posts
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.