cadboy Posted June 5, 2008 Share Posted June 5, 2008 How can I sum up the actual dimension enties. I would like to check a row of dimensions to make sure they add up. Sometimes the dimensions can be off a hundreth in a long line of dimensioning. Quote Link to comment Share on other sites More sharing options...
CADguy209 Posted June 5, 2008 Share Posted June 5, 2008 Try setting the percision in your dimstyle to display more decimal places. Quote Link to comment Share on other sites More sharing options...
lpseifert Posted June 5, 2008 Share Posted June 5, 2008 Try Ctrl+8 Quote Link to comment Share on other sites More sharing options...
cadboy Posted June 5, 2008 Author Share Posted June 5, 2008 Thank you. I wanted to be able to sum the dimension entities withoout changing the precision. I would like to be able to add the dimension entities at the present precision because that is what will be used to construct. I also used Ctrl+8 to bring up the calculator but I don't understand how this can add dimension entities other than "by hand". Am I missing something. Thank you as well. Quote Link to comment Share on other sites More sharing options...
CADguy209 Posted June 6, 2008 Share Posted June 6, 2008 I dont believe there is any stock autocad command that will do what you want. One could make a lisp rountine Im sure, If there isnt one already out there. Im still a little mystifyed about what it its exaclty that you are trying to achieve. If you just want to know the total distance across something you could just use the distance command? Quote Link to comment Share on other sites More sharing options...
cadboy Posted June 6, 2008 Author Share Posted June 6, 2008 We have strings of 10 to 15 or more dimensions that have an overall dimension above them. We have to have the decimal places set to two for the drawing. We need a quick way to check to see if the dimensions add up to the overall dimension. At present, we have to add all of the dimensions with a calculator to make sure they add up to the overall dimension. I am very surprised that I cannot find a lisp routine or a built in feature in Autocad that will sum the values of dimension entities. I would like to be able to select two or more dimensions and obtain the sum. I can check the overall dimension with the distance command but I need to know that a row of dimensions, each with two decimal places ,will add up to the overall dimension. I am very surprised that I cannot find a solution to what seemed to me at first to be a simple problem. Quote Link to comment Share on other sites More sharing options...
CADguy209 Posted June 7, 2008 Share Posted June 7, 2008 Well the only thing i can think of is try using the Quickcalc command. You can do a distance and it will input the value into the calculator, then you can add and select distance again...wash rinse repeat. Its a bit clunky and might not be any better than doing it by hand with a calculator but you will at least get the measured values as they stand inside of autocad. Quote Link to comment Share on other sites More sharing options...
cadboy Posted June 7, 2008 Author Share Posted June 7, 2008 Thanks, it is amazing that I have been checking these dimensions by hand all of this time and when I finally think of a way to simplify the process, a lisp of this simple routine cannot be found. I have searched everywhere. What is also incredible is that if there is not a lisp routine out there to do this, everone is still checking their dirmensions by hand also. We have been checking them by hand for so long, we did not imagine being able to simplify the process. I know that the lisp routine would be simple because all you would have to do is to select the dimension, obtain it's value and so on and then sum all the values. I searched the net pretty hard and I am in shock that this simple tool cannot be found. Thank you and thanks to everybody that posted. Quote Link to comment Share on other sites More sharing options...
CADguy209 Posted June 8, 2008 Share Posted June 8, 2008 Thanks, it is amazing that I have been checking these dimensions by hand all of this time and when I finally think of a way to simplify the process, a lisp of this simple routine cannot be found. I have searched everywhere. What is also incredible is that if there is not a lisp routine out there to do this, everone is still checking their dirmensions by hand also. We have been checking them by hand for so long, we did not imagine being able to simplify the process. I know that the lisp routine would be simple because all you would have to do is to select the dimension, obtain it's value and so on and then sum all the values. I searched the net pretty hard and I am in shock that this simple tool cannot be found. Thank you and thanks to everybody that posted. Well, hope I helped. Im still puzzled as to why you need to check and sum individual dims if you are showing an overall dim. I mean as long as the overall is what you want, and you are drawing every thing accuratly why do you need to go back and check your dims individually? Quote Link to comment Share on other sites More sharing options...
cadboy Posted June 8, 2008 Author Share Posted June 8, 2008 The site plan is drawn by the architect and is sometimes off a hundreth here and there. But no matter what, as a checker, I will always check dimensions on a site plan to make sure they add up. I cannot know if the drawing is off (drawn incorrectly) until I check the dimension and they do not add up. I tried to write the lisp but I cannot figure how to select the multiple dimensions and get the values nor do I know how to sum them once I have them in the lisp routine. The lisp site is very much appreciated though. Quote Link to comment Share on other sites More sharing options...
SEANT Posted June 8, 2008 Share Posted June 8, 2008 This is an interesting concept so I put together a quick VBA routine to check it’s viability. The routine could certainly use more work, especially to include Fractional and Architectural units. Another day, perhaps. Option Explicit Sub CompDisplay2Actual() Dim intCode(6) As Integer Dim varData(6) As Variant Dim entEntity As AcadEntity Dim dblCurrentMeasure As Double Dim dblRunningMeasure As Double Dim dblCurrentDisplay As Double Dim dblRunningDisplay As Double Dim dblRoundedMeasure As Double Dim entRotated As AcadDimRotated Dim entAligned As AcadDimAligned Dim intPrecision As Integer Dim intAppPrecision As Integer intAppPrecision = ThisDrawing.GetVariable("LUPREC") intCode(0) = 0: varData(0) = "Dimension" intCode(1) = -4: varData(1) = "<Or" intCode(2) = 70: varData(2) = 32 intCode(3) = 70: varData(3) = 33 intCode(4) = 70: varData(4) = 160 intCode(5) = 70: varData(5) = 161 intCode(6) = -4: varData(6) = "Or>" If SoSSS(intCode, varData) > 0 Then For Each entEntity In ThisDrawing.SelectionSets.Item("TempSSet") Select Case entEntity.ObjectName Case "AcDbRotatedDimension" Set entRotated = entEntity dblCurrentMeasure = entRotated.Measurement intPrecision = entRotated.PrimaryUnitsPrecision dblCurrentDisplay = Round(dblCurrentMeasure, intPrecision) Case "AcDbAlignedDimension" Set entAligned = entEntity dblCurrentMeasure = entAligned.Measurement intPrecision = entAligned.PrimaryUnitsPrecision dblCurrentDisplay = Round(dblCurrentMeasure, intPrecision) End Select dblRunningMeasure = dblRunningMeasure + dblCurrentMeasure dblRunningDisplay = dblRunningDisplay + dblCurrentDisplay Next dblRoundedMeasure = Round(dblRunningMeasure, intAppPrecision) MsgBox "Total measure as displayed: " & dblRunningDisplay & _ vbCr & "Total as returned by 'Distance': " & dblRoundedMeasure & _ vbCr & "Total actual measure: " & dblRunningMeasure End If End Sub Sub SSClear() Dim SSS As AcadSelectionSets On Error Resume Next Set SSS = ThisDrawing.SelectionSets If SSS.Count > 0 Then SSS.Item("TempSSet").Delete End If End Sub Function SoSSS(Optional grpCode As Variant, Optional dataVal As Variant) As Integer Dim TempObjSS As AcadSelectionSet SSClear Set TempObjSS = ThisDrawing.SelectionSets.Add("TempSSet") 'pick selection set If IsMissing(grpCode) Then TempObjSS.SelectOnScreen Else TempObjSS.SelectOnScreen grpCode, dataVal End If SoSSS = TempObjSS.Count End Function I guess the other question would be; what should be done if there is a significant discrepancy? Which of the two dimensions takes precedence, and which should be modified? Is this another reason to only provide one explicit dimension set, even if it means a final dimension needs to be derived by some poor SOB on site? Quote Link to comment Share on other sites More sharing options...
cadboy Posted June 9, 2008 Author Share Posted June 9, 2008 Incredible. How did you do this? Amazing. Do you work for NASA? You have a gift for code. I cannot thank you enough. Next time I am in Rhode Island, I would like to buy you a beer. I very much appreciate your help. It's people like you that make this industry great. Quote Link to comment Share on other sites More sharing options...
SEANT Posted June 9, 2008 Share Posted June 9, 2008 Next time I am in Rhode Island, I would like to buy you a beer. I'll get the pretzels. Quote Link to comment Share on other sites More sharing options...
ganeshmag Posted September 22, 2014 Share Posted September 22, 2014 SEANT, how to appload this lisp routine..and how to use this lisp.. ..please help Quote Link to comment Share on other sites More sharing options...
lrm Posted September 22, 2014 Share Posted September 22, 2014 I think the logic of a VisualLISP program to add the displayed dimensions would go something like the following. 1. Prompt user to select a group of linear dimension lines. 2. Determine the number of dims selected (call it n) 3. Create a loop of n iterations and for each dim do the following: a. Extract the dimstyle using assoc 3 of the selected dim b. Make that dimstyle current. c. Retrieve the precision of the dimstyle with: (setq prec (getvar “dimdec”)) d. Get the precise dimension value using assoc 42 e. Round the true dimension value to the displayed value using a combination of real-to-string and ASCII-to-floating point. E.g.: (setq dimround (atof (rtos dimtrue prec prec))) f. Use a summer to add the selected dims: (setq sum (+ sum dimround)) I don’t have time to code this right now but this should get you started. You may want to include the ability to subtract a dimension as well. Good luck! Quote Link to comment Share on other sites More sharing options...
ganeshmag Posted September 22, 2014 Share Posted September 22, 2014 I think the logic of a VisualLISP program to add the displayed dimensions would go something like the following.1. Prompt user to select a group of linear dimension lines. 2. Determine the number of dims selected (call it n) 3. Create a loop of n iterations and for each dim do the following: a. Extract the dimstyle using assoc 3 of the selected dim b. Make that dimstyle current. c. Retrieve the precision of the dimstyle with: (setq prec (getvar “dimdec”)) d. Get the precise dimension value using assoc 42 e. Round the true dimension value to the displayed value using a combination of real-to-string and ASCII-to-floating point. E.g.: (setq dimround (atof (rtos dimtrue prec prec))) f. Use a summer to add the selected dims: (setq sum (+ sum dimround)) I don’t have time to code this right now but this should get you started. You may want to include the ability to subtract a dimension as well. Good luck! I don't know about lisp...please see below detail dimension shows 22 27/32" but decimal shows 22.83333. not show original 22.84375 its various. how to i find this error.or how rectify this error. and i sum this 5 intermediate is 22 27/32", its comes error 1/32" or 1/16". how to find fractional shows like this 22.8333. any lisp for actual fractional dimension calculation, or any lisp for highlight error fractional dimension in autocad................... kindly help.. Quote Link to comment Share on other sites More sharing options...
lrm Posted September 23, 2014 Share Posted September 23, 2014 As I understand it, the length being dimensioned is 22.8333 but since you have the dim style set to Fractional and the precision set to 1/32” the displayed dimension line shows 22 27/32. The easiest fix may be to modify the geometry so that the distance truly is 22.84375. If this is not practical then a lisp program would be helpful to convert the fraction part of the displayed text and compare it with the decimal component of the true dimension and output the difference. Any volunteers to write this code? I don’t think it would be hard just tedious. I don't have the time now to do it. Quote Link to comment Share on other sites More sharing options...
Larry Christie Posted September 23, 2014 Share Posted September 23, 2014 Have you tried using the dimension ordinate command. Set your ucs to the base point you wish to use, then use the dimension ordinate command to provide you a running total as it were from the base point. Quote Link to comment Share on other sites More sharing options...
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.