SirGreenWizard Posted July 21, 2022 Share Posted July 21, 2022 I am trying to create a custom report to include all dimensions on a drawing. Also is it possible to have the report sum up all the dimensions to give me a running total? Quote Link to comment
Pat Stanford Posted July 21, 2022 Share Posted July 21, 2022 The SUMmed value should show in the database header row the the dimension column. If you have the header row hidden you should be able to use a simple formula of that cell. So if the dimensions are in column B of a database in Row 3, then a formula in any spreadsheet cell of =B3 should get your the sum of all your dimensions. HTH Quote Link to comment
SirGreenWizard Posted July 21, 2022 Author Share Posted July 21, 2022 So this is my first attempt at creating a worksheet, and a report. I can't seem to figure out how to populate my worksheet with the dimensions on the drawing. Quote Link to comment
Pat Stanford Posted July 21, 2022 Share Posted July 21, 2022 The VW worksheet does not offer the fuctionality you want as stock. If you are working in Metric it can be done. If you need Feet & Inches it get's more complicated based on how the data has to be extracted. By any chance are all of your dimensions horizontal and/or vertical? If so there is a different work around we could use. Quote Link to comment
SirGreenWizard Posted July 21, 2022 Author Share Posted July 21, 2022 the go in multiple directions, even angles Quote Link to comment
michaelk Posted July 21, 2022 Share Posted July 21, 2022 @Pat Stanford Just tried what you probably just tried. Num2Str() is doing a subtraction in Imperial dimensions (feet - inches), isn't it? Quote Link to comment
Pat Stanford Posted July 21, 2022 Share Posted July 21, 2022 OK, let's try this as a starting point. The attached file has a worksheet and a worksheet script. The Worksheet has row 3 set up as a Database. The Criteria for that row are set to show all of the Dimension objects in the drawing. You can edit the criteria to only return the dimensions you are concerned with my using layers, classes, or anything else. I will leave it to you to read the documentation on Worksheets and Databases to learn more. The file also contains a Script named GetDimLength. This script is used in cell A3 using a formula of =RunScript('GetDimLength'). The script will be run once for every object that shows up as a subrow (i.e. 3.1, 3.2, etc.) in the database. The sum of all the values will be shown in the database header row (3). Cell has a formula of =A3 showing how you can use the summed value in other places in the worksheet. You can edit the script for more description about how it works. This is complicated, so ask again if you have more questions. HTH Dimension Length to Worksheet.vwx 1 Quote Link to comment
Pat Stanford Posted July 21, 2022 Share Posted July 21, 2022 Yes it is. Take a look at the Concat(Substring, Substring) line in the attached worksheet script to see how I worked around it. 1 Quote Link to comment
michaelk Posted July 21, 2022 Share Posted July 21, 2022 @Pat Stanford you beat me to it. Nice. @SirGreenWizard, can I guess from your signature that you might be trying to make something like a cut list? If so, there are easier ways than getting Pat to write you a script :-). Quote Link to comment
SirGreenWizard Posted July 21, 2022 Author Share Posted July 21, 2022 40 minutes ago, michaelk said: @Pat Stanford you beat me to it. Nice. @SirGreenWizard, can I guess from your signature that you might be trying to make something like a cut list? If so, there are easier ways than getting Pat to write you a script :-). Not so much of a cut list as a running total. This is for a project where I am running LED tape, zig-zagging across a scenic element. I'm just trying to get a shortcut 47 minutes ago, Pat Stanford said: OK, let's try this as a starting point. The attached file has a worksheet and a worksheet script. The Worksheet has row 3 set up as a Database. The Criteria for that row are set to show all of the Dimension objects in the drawing. You can edit the criteria to only return the dimensions you are concerned with my using layers, classes, or anything else. I will leave it to you to read the documentation on Worksheets and Databases to learn more. The file also contains a Script named GetDimLength. This script is used in cell A3 using a formula of =RunScript('GetDimLength'). The script will be run once for every object that shows up as a subrow (i.e. 3.1, 3.2, etc.) in the database. The sum of all the values will be shown in the database header row (3). Cell has a formula of =A3 showing how you can use the summed value in other places in the worksheet. You can edit the script for more description about how it works. This is complicated, so ask again if you have more questions. HTH Dimension Length to Worksheet.vwx 67.59 kB · 1 download Pat, I'm still in VW 2021, my company hasn't moved onwards to 2022 yet. , so I don't have to add up each run on a notepad. Quote Link to comment
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.