Gaspar Potocnik Posted June 22, 2013 Share Posted June 22, 2013 Can this be done? I need to to get XCENTER and YCENTER to show in meters and in feet and inches, obviously in separate columns. I've tried multiplying the value which is in meters by 3.2808399 and setting the column to fractional 1/12, it works, but there is no unit mark and it isn't easy reading... Any ideas? Cheers Quote Link to comment
Diamond Posted June 22, 2013 Share Posted June 22, 2013 Hi, Can you apply a suffix to the field? Right click on the cell and select format (maybe start with area, but if that doesn't work, use decimal), and add the units to the trailer field. Did that work? Quote Link to comment
michaelk Posted June 22, 2013 Share Posted June 22, 2013 Try this - it will round feet and inches off to the nearest inch =CONCAT(((XCENTER*3.2808399) DIV 1), '''', ' - ', SQRT((ROUND((((XCENTER*3.2808399) MOD 1)*12)))*(ROUND((((XCENTER*3.2808399) MOD 1)*12)))), '"') and be glad you don't have to work in imperial units all the time! example attached hth mk Quote Link to comment
michaelk Posted June 24, 2013 Share Posted June 24, 2013 On second thought, you're better off doing the conversion in inches. The above method fails when the inches part of the dimension is greater than 11 1/2. You end up with dimensions like 3' - 12". However, if you do the conversion into inches, it's easy to DIV 12 and MOD 12 to get feet and inches after rounding to the nearest inch. (It's probably possible to do 1/4" or 1/8" as well, but formatting it gets tricky.) So this will work better: =CONCAT(ROUND(XCOORDINATE*39.37007874) DIV 12, '''', ' - ', SQRT((ROUND(XCOORDINATE*39.37007874) MOD 12)*(ROUND(XCOORDINATE*39.37007874) MOD 12)), '"') example attached ps I switched to stake objects and x and y coordinates to make it easier to see. hth mk Quote Link to comment
James Russell Posted June 27, 2013 Share Posted June 27, 2013 Just going to throw something in here that I was having a look at: http://developer.vectorworks.net/index.php?title=VS:SetWSCellNumberFormat Trying out both option 10 under the DO NOT USE category. Seems to somewhat work but didn't have the brain space at the time to play with option modifiers. Also I think there should be either modifiers for option 5 (Dimension) to enable Secondary Dimension choice, where you could easily have your two dimension sets or just create an option 14 for Secondary Dimension. It would make sense to have it as a modifier option so you could have Secondary Area and Secondary Volume also. Maybe it exists, maybe it's a wish. Love the formula though Michael, it's a crafty one! J Quote Link to comment
michaelk Posted June 27, 2013 Share Posted June 27, 2013 Interesting. Several of my formatting scripts use SetWSCellNumberFormat(). But I never tried 9 or 10! It would be so much easier if there was a cell format setting for dimension units. Until we can stop using fractional parts of one twelfth of a dead king's foot it would be nice if we could format dimensions in worksheets independently of the document units setting. There are 11 possible linear dimension formats, 11 area formats, and 8 volume formats. Now you can use SetWSCellNumberFormat() to set number formats for General, Fixed Decimal, Decimal w/ commas, Scientific, Fractional, Linear Dimensions, Angles, Dates, Conditional, Area, Volume, and Text. Dates uses the accuracy argument to set one of 12 formats. Why not have an additional argument for the 11 linear, 11 area, and 8 volume dimension units? 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.