UNITS-Can I configure to only have selection of millimeters or inches
UNITS-Can I configure to only have selection of millimeters or inches
(OP)
I am frequently switching my unit system from millimeters to inches, back and forth in certain projects, and am sick of scrolling thru all of the other unit selections. Is there a way to get rid of the other selections...feet,centimeters,meters and so on?






RE: UNITS-Can I configure to only have selection of millimeters or inches
RE: UNITS-Can I configure to only have selection of millimeters or inches
RE: UNITS-Can I configure to only have selection of millimeters or inches
Making the best use of this Forum. FAQ559-716
How to get answers to your SW questions. FAQ559-1091
Helpful SW websites every user should be aware of. FAQ559-520
RE: UNITS-Can I configure to only have selection of millimeters or inches
'Paste into a blank macro and assign a macro toolbar button
Dim swApp As Object
Dim Doc As Object
Dim retval As Boolean
Dim Msg As String
Const swUnitsLinear = 47
Const swUnitsLinearDecimalDisplay = 48
Const swUnitsLinearDecimalPlaces = 49
Const swMM = 0
Const swINCHES = 3
Const swDocASSEMBLY = 2
Sub main()
Set swApp = CreateObject("SldWorks.Application")
Set Doc = swApp.ActiveDoc
If Doc Is Nothing Then
Exit Sub
End If
If Doc.GetUserPreferenceIntegerValue(swUnitsLinear) = swINCHES Then
retval = Doc.SetUserPreferenceIntegerValue(swUnitsLinear, swMM)
retval = Doc.SetUserPreferenceIntegerValue(swUnitsLinearDecimalPlaces, 2)
ElseIf Doc.GetUserPreferenceIntegerValue(swUnitsLinear) = swMM Then
retval = Doc.SetUserPreferenceIntegerValue(swUnitsLinear, swINCHES)
retval = Doc.SetUserPreferenceIntegerValue(swUnitsLinearDecimalPlaces, 3)
End If
End Sub
RE: UNITS-Can I configure to only have selection of millimeters or inches
If as I often do, you have to mix systems in the same drawing, you can just type in the appropriate system when you need it, and leave the drawing system set to whichever is more frequent.
ie. type 34mm or 3.25" for your dimension.
Of course, this'll automatically convert the dimension to the other system, so sometimes I'll add a note in parenthesis to my dimension so I'll later remember that 2.992 is (76mm).
RE: UNITS-Can I configure to only have selection of millimeters or inches
Making the best use of this Forum. FAQ559-716
How to get answers to your SW questions. FAQ559-1091
Helpful SW websites every user should be aware of. FAQ559-520
RE: UNITS-Can I configure to only have selection of millimeters or inches
We have a dimension favourite set up for each type of dimension i.e. fractional, 2 decimal, 3 decimal, dual, mm etc. You can then use the dimension filter to mass select a bunch of dims already added to the drawing and choose which favourite you would like to apply to them all. You can also choose your desired dimension favourite from the dim properties drop down list as you go.
RE: UNITS-Can I configure to only have selection of millimeters or inches
ht
The .txt file explains how to change the decimal places, fractions, etc., while the .ini file is where you do the actual changes.
For example, we do not use feet, meters, etc., so I deleted those and left the ones I wanted.
Save a backup of the "UnitManager.ini" file, and change the contents of the Unitmanager.ini file to:
CODE
' GENERAL INFORMATION:
' Units file must follow format below.
'
' Unit Name Typ, Fra, Den/Plc
[UNITS]
"Inch (Decimal 2)", 3, 1, 2
"Inch (Decimal 4)", 3, 1, 4
"Inch (Fraction)", 3, 2, 32
"Millimeter (decimal 2)", 0, 0, 2
That gives you options for 2 or 4 decimal places, fractions rounded to 32nds of an inch, and milimeters to 2 decimal places.
Flores
RE: UNITS-Can I configure to only have selection of millimeters or inches
RE: UNITS-Can I configure to only have selection of millimeters or inches
RMB click on a dimension, select Properties, select Display as dual dimension.
Making the best use of this Forum. FAQ559-716
How to get answers to your SW questions. FAQ559-1091
Helpful SW websites every user should be aware of. FAQ559-520