×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

UNITS-Can I configure to only have selection of millimeters or inches
4

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

Write a macro.

RE: UNITS-Can I configure to only have selection of millimeters or inches

or just make different templates

RE: UNITS-Can I configure to only have selection of millimeters or inches

I'm with MElam on this one ... I have Imperial & Metric  templates for Parts, Assemblies & Drawings.


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

3
'This macro will toggle between inches (3dec) and mm (2dec)
'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

Great suggestions here.

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

ongybill ... You could use dual dimensions instead of adding the note.


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

Sheet specic unit defaults and configurable dim options would be nice but until then...

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

We use a macro from Lenny's site called "unit manager" that is pretty easy to configure for different units, decimal places, and fractions, plus it has a simple dialog box that makes selection a snap.
http://webpages.charter.net/mkikstra/SWX-macros.html

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

' UnitManager.swp
' 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

I'll have to look up dual dimensions, never heard of that one.

RE: UNITS-Can I configure to only have selection of millimeters or inches

You will find very little about it in the Help files.
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources