J. Wallace Posted March 1, 2015 Share Posted March 1, 2015 Hi All MK was kind enough to provide this handy script which will allow me to easily switch between metric and standard units. I'm new to VW scripts and want to place a line or command that tells the metric units to read by decimal not fraction. Any ideas? Quote Link to comment
michaelk Posted March 1, 2015 Share Posted March 1, 2015 Yeah. What he said. What's the secret to changing the document units for area and volume? mk Quote Link to comment
michaelk Posted March 1, 2015 Share Posted March 1, 2015 J Fixed the decimal / fraction problem: Quote Link to comment
J. Wallace Posted March 2, 2015 Author Share Posted March 2, 2015 Thanks MK that is fantastic.... Jamie Quote Link to comment
michaelk Posted March 2, 2015 Share Posted March 2, 2015 Still hoping someone can provide insight on changing the document area and volume units. Is it a SetPrefInt(###,##) or SetPrefString(###,xx) that I don't understand? mk Quote Link to comment
twk Posted March 3, 2015 Share Posted March 3, 2015 Still hoping someone can provide insight on changing the document area and volume units. Looking at the VS Developer Wiki VS:Developer Wiki - Appendix Primary Units The appendix references for SetPref/GetPref[int/string/real] Area Unit Name PrefID 177, its the of the String type. Volume Unit Name PrefID 181, its also of the String type. Calling GetPrefString(177) returns the Area Unit Name, and SetPrefString(177, ), sets the document Area Unit to Unit string provided. Attached is a screenshot of the available Area Units. Quote Link to comment
michaelk Posted March 3, 2015 Share Posted March 3, 2015 Ahhhh… Thank you! I thought they were indexed. It's much more simple than I thought. Jamie Here are the updates that do area and volume: hth mk Quote Link to comment
michaelk Posted March 3, 2015 Share Posted March 3, 2015 On a related note: Can anyone explain the purpose of SetPrefReal(176,###) and SetPrefReal(180,###)? They are explained as Area Units Per Square Inch and Volume Units Per Cubic Inch. I didn't change them, but when I use SetPrefString(177,#) and SetPrefString(181,#) it is changing preferences 176 and 180 to numbers that make sense: Feet and inches: 176 is 1/144 : 180 is 1/1728 millimeters: 176 is 645.16 (conversion factor for square inches to mm2) : 180 is 16387.064 (conversion factor for cubic inches to mm3) meters: 176 is 0.000064516 (conversion factor for square inches to m2) : 180 is 16387.064e-5 (conversion factor for cubic inches to m3) Are those values attached to the string values for prefs 177 and 181? Is the idea behind setting your own values for units per square inch and units per cubic inch so you can create your own unit of measure for area and volume? Thanks! mk 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.