Dadgad Posted May 5, 2015 Posted May 5, 2015 The excel formula could be (all to zero places of decimals):- =ROUND(data,0) which would round it to nearest whole number =TRUNC(data,0) which would truncate the fractional part =ROUNDDOWN(data,0) which would round downwards =ROUNDUP(data,0) which would round up As the goal is the nearest whole number, wouldn't the first two be all that are required? Quote
eldon Posted May 5, 2015 Posted May 5, 2015 As the goal is the nearest whole number, wouldn't the first two be all that are required? The OP would have to tell you that. I just tried to give as many options as I could think of (there may be more!). Quote
Dadgad Posted May 5, 2015 Posted May 5, 2015 Understood, just covering the usual bases. In post #8 he did specify. Quote
eldon Posted May 5, 2015 Posted May 5, 2015 In post #8 he did specify. Both his examples round down, so we cannot be sure whether any 10.7" measurements would need to be rounded up or down. Quote
Dadgad Posted May 5, 2015 Posted May 5, 2015 Both of the examples he gave rounded down, but that was just coincidental, as he also wrote "however I want the outputs of these polylines to be rounded to the nearest WHOLE number." Sorry eldon didn't mean to make a mountain out of a mole hill. Quote
eldon Posted May 5, 2015 Posted May 5, 2015 You should know by now that the OP may not always give his complete requirement until after 20 posts or more. Anyway, someone else might find the information useful. Quote
MechanicalAnimal Posted May 5, 2015 Author Posted May 5, 2015 Thanks for all of the replies! As I mentioned I am definitely trying to keep all of the leg work within the four walls of CAD. The program I wrote worked as a stepping stone towards this very goal, and while it rounded and sorted the user was still responsible for measuring and typing each individual length into the program (very time consuming and can cause a lot of human error). This program was written this way because we only had LT versions of CAD and no one was sure how to measure all of these polylines and data extract the info into the excel and then export it back into CAD organized in the correct format. We purchased full version of 2015 Mechanical hoping to keep everything within CAD and data extract these lengths to a Table and we have accomplished about 90% of that, with the exception of this small error. As far as formulas go, are you able to insert formulas into a table in CAD? I apologize but I have never done this before. If this is a possibility could someone steer me towards some tutorials online for this? Much appreciated everyone! Quote
Cad64 Posted May 6, 2015 Posted May 6, 2015 Post approved . . . . . again. Boy, the forum doesn't seem to like you very much. It puts every post into moderation. Hopefully after you get your 10th post it will leave you alone. Quote
Dadgad Posted May 6, 2015 Posted May 6, 2015 (edited) You can insert formulas into cells, in Tables, in Autocad. But it is not done when using the TABLESTYLE command, but after the fact, by double clicking into a cell (which will need to be unlocked) in an existing table. In the data extraction setup you can also create formulas when REFINING the data, but having tried that, I didn't see how it could help you. That doesn't mean that it couldn't possibly, just that I was unable to do it. It might be worth mentioning that an inserted Data Extraction table can be EDITED. The offending discrete 10" lengths (based on the raw data sorting) could be totalled, and the second, or any other offending line item or items be deleted from the table. I understand full well, that workaround falls well short of your target, just a headsup. It would still be appreciably easier than the way you used to do it, now that you have clarified that there was a lot of manual entry involved in using the old excel program. No doub there is some way that this could be more easily accomplished with lisp. Edited May 6, 2015 by Dadgad Quote
MechanicalAnimal Posted May 6, 2015 Author Posted May 6, 2015 DadGad, Inserting a formula into the cells may work to sum the "like rows" after they have been rounded. Based on this though, would I be able to save a "table template" of some kind so that when I data extract the information into a table I am not forced to re enter the formulas every time? This would be huge! Thanks again everyone for the postings! Quote
Cad64 Posted May 6, 2015 Posted May 6, 2015 Post approved. Only 3 more to go and then hopefully this auto-moderation will stop. Quote
Dadgad Posted May 7, 2015 Posted May 7, 2015 The cell formulation available in a regular Autocad table is much more comprehensive than that available in the data extraction style function. The big table in my screenshot was not meant to demonstrate a data extraction table (which it is not), but rather the ability to formulate cell data in Autocad, as per your question in post #27. I created that table because I had hundreds of screen modules of the same height, and some common attributes, suitable for a formulatic approach. I didn't want to have to do them all individually. They are all on a single drawing, which includes the table. All that is required is that the item number be entered, how many of that item, and the over all width of the screen. The rest of the output was calculated by the software (cell formulas), except for rather varied and customized hole placements represented by the editable entries "Dim A - C". I keep this drawing as a template, in case I have a similar task down the road. If I do, I will almost certainly need to edit my formulas, as the heights and other design features might be similar, but numerically different. I have revisited the data extraction add column formula option, and it won't cut it. Edit them manually, or try a custom lisp. Not for lack of trying. Quote
MechanicalAnimal Posted May 12, 2015 Author Posted May 12, 2015 Thanks Dadgad and everyone else for putting time into trying to figure this out for me. It think we may look into having a lisp written to help us out. Thanks again everyone! 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.