Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to do Suffixes and Prefixes

Status
Not open for further replies.

Adrian2

Mechanical
Mar 13, 2002
303
Dear Folks;

So I'm working on this drawing and the customer tells me he wants to see dual dimensions with millimeters first and inches second with the suffix " on the inches dimension.

I've looked everywhere but cant find a way to add suffixes to a dual dimension.

Can anyone help ?



Adrian Dunevein
AAA Drafting Services


SW2006 Office Pro. SP4.1
 
Replies continue below

Recommended for you

Only manually for each dim, which I don't recommend.
I had a customer ask this once.
Our standard was to have a note on the dwg "All dimensions are in inches. Dimensions in brackets are in mm".
I told them this is how we did our business and is pretty much industry standard.
I suggest use a note.

Chris
Systems Analyst, I.S.
SolidWorks 06 4.1/PDMWorks 06
AutoCAD 06
ctopher's home (updated 06-21-06)
 
Send him a book on drafting standards, gift wrapped with a pretty bow.
 
Dear Folks;

Thanks for the suggestions,

I did do a forum search last night and read about the getting to know Mr. ANSI issue.

But I believe SW should offer a bit more choice in customizing dimensions.

Of course maybe its a subtle conspiracy to get the USA on to the metric system.

Whether you like it or not some companies are going to do their drawings the way they have been used to for the past thirty years. Especially if they have had few if any drawing issues. If you cant adapt to that, then you have to go find some other customer. Yeah right.

I'm opening the drawings in Autocad and fixing them that way

But thanks for your help - Solidworks still rules OK

Best Regards



Adrian Dunevein
AAA Drafting Services


SW2006 Office Pro. SP4.1
 
SW follows most of all the standards, if they made it more customizable then it would be AutoCAD and we would be back to the way it used to be with Acad... no standards and anyone could make drawings again... I am sooooo happy SW uses most of the standards and doesn't allow for people to customize things that are not standarized already... makes drawings readable and drafters a trade again.

Those that won't change their ways are old school and we need to get the old dirt out of the office and bring in the new. Get the old guy that doesn't like change out and bring in some standards... this guy is what makes everyone elses life miseriable, because he won't change. Standards is a way of life and it should be that away in drawings.

Regards,

Scott Baugh, CSWP [pc2]
faq731-376
 
I'm opening the drawings in Autocad and fixing them that way
I'm sorry, but that is ridiculous. You spend thousands of dollars on SW, and then you turn around and modify a drawing in ACAD? If there are any changes in SW, then you have to save it to ACAD, and then modify the dimensions again.

2 ways of doing what you want:
1st way:
If fractions will work for you:
Document properties tab > Dimension standard: ANSI

Document properties tab > Units: Length units=Inches, fractions

2nd way:
Simply make a dimension favorite with dual dimensions and add the " mark, and save it. Next window the whole sheet and pick the dimension favorite.

SW06 SP5.0



Flores
 
Are you trying to add the " inside the parenthesis of the dual dimension?
 
Rather than opening your drawings in AutoCAD, try this macro. It will add decimal inch suffixes including the " inside square brackets to each dimension in the drawing. Any existing suffixes that do not include both "[" and "]" will be preserved and tacked onto the end of the new suffix. Hole notes that use the "define by geometry" option will be found, but hole notes that are "define by hole wizard" will not. These values are suffixes only, so the macro will have to be re-run after any dimension changes. Re-running the macro will update the values inside square brackets. You will also be given the option at the beginning of macro execution to delete all dual values.

Enjoy!

Code:
Dim swApp As SldWorks.SldWorks
Dim swDoc As SldWorks.ModelDoc2
Dim swDwg As SldWorks.DrawingDoc
Dim swView As SldWorks.View
Dim swDispDim As SldWorks.DisplayDimension
Dim swDim As SldWorks.Dimension
Dim sCurSuffix As String
Dim nOpenParPos As Long
Dim nCloseParPos As Long
Dim vDimVal As Variant
Dim dInchVal As Double
Dim sInchString As String
Dim sNewSuffix As String
Const DUALFORMAT As String = "0.00"
Dim KillFlag As Integer
Dim sMsg As String


Sub main()

Set swApp = Application.SldWorks
Set swDoc = swApp.ActiveDoc

If swDoc.GetType <> swDocDRAWING Then
    MsgBox "This macro only works for drawing files."
    Exit Sub
End If

sMsg = "This macro will add a text suffix of the inch value with """ & _
        vbCrLf & "to all dimensions in this drawing.  This assumes that" & _
        vbCrLf & "this drawing is dimensioned in millimeters" & vbCrLf & vbCrLf & _
        "To add or update inch value suffixes inside ""[ ]"", choose ""Yes""" & vbCrLf & _
        "To remove all inch value suffixes, including the ""[ ]"", choose ""No""" & _
        vbCrLf & "To quit, choose ""Cancel"""
KillFlag = MsgBox(sMsg, vbYesNoCancel, "Add inch value?")

If KillFlag = vbCancel Then
    Exit Sub
End If


Set swDwg = swDoc


Set swView = swDwg.GetFirstView
While Not (swView Is Nothing)
    Set swDispDim = swView.GetFirstDisplayDimension5
    While Not swDispDim Is Nothing
        Set swDim = swDispDim.GetDimension
        vDimVal = swDim.GetValue3(swThisConfiguration, Empty)
        dInchVal = vDimVal(0) / 25.4
        sInchString = Format(dInchVal, DUALFORMAT)
        sCurSuffix = swDispDim.GetText(swDimensionTextSuffix)
        nOpenParPos = InStr(1, sCurSuffix, "[", vbTextCompare)
        nCloseParPos = InStr(1, sCurSuffix, "]", vbTextCompare)
        If (KillFlag = vbNo) And (nOpenParPos > 0) And (nCloseParPos > 0) Then
            sNewSuffix = Left(sCurSuffix, nOpenParPos - 1)
            sNewSuffix = sNewSuffix & Right(sCurSuffix, Len(sCurSuffix) - nCloseParPos)
        ElseIf (nOpenParPos > 0) And (nCloseParPos > 0) Then
            sNewSuffix = Left(sCurSuffix, nOpenParPos)
            sNewSuffix = sNewSuffix & sInchString & """"
            sNewSuffix = sNewSuffix & Right(sCurSuffix, Len(sCurSuffix) - (nCloseParPos - 1))
        Else
            If KillFlag <> vbNo Then
                sNewSuffix = "[" & sInchString & """] " & sCurSuffix
            Else
                sNewSuffix = sCurSuffix
            End If
        End If
        swDispDim.SetText swDimensionTextSuffix, sNewSuffix
        Set swDispDim = swDispDim.GetNext5
    Wend
    Set swView = swView.GetNextView
Wend


End Sub
 
Dear handleman;

You are awesome. Talk about overdelivering, all I can give is a star, too bad I cant give a whole bunch at once !

On these drawings are dual dimensions, the imperial dimensions are within square brackets and have the inch symbol inside the brackets.

And, Mr Baugh, speaking as an old piece of dirt myself, I can appreciate where those who deviate from standards are coming from.

My customer is basically a father and son shop, very small but the work they turn out is high precision and quite amazing. They have a hydraulic clamp ring product line and practically own a worldwide market for them. These people may be old school but they know what they are doing and dont need some fancy high falutin' 3D program to tell them otherwise. I am going to treat them with the respect they deserve and gently show them what Solidworks can do, even if I have to supply Autocad files along the way. In time I may get them to change.

Back when the ANSI standards were created, It was understood that ANSI standards were created for voluntary compliance. Industry adopted these standards because it made sense to them. But it was democratic, you didnt have to opt in if you didnt want to. Along with their pen and ink drawings, vellum and pseudo ANSI standards some of these old pieces of dirt came up with some pretty amazing stuff.

Now we are supposed to be living in an age where we are more sophisticated, while ANSI still offers us freedom of choice, large companies take a more dictatorial view. For the common good of all, they would say. But its unfair and undemocratic and perhaps most important of all, it stifles creativity.

By Thunder, all I'm asking for is a blasted INCH symbol !

Get off your high horse !






Adrian Dunevein
AAA Drafting Services


SW2006 Office Pro. SP4.1
 
No problem, Adrian. I had already written two different macros that did pieces of this, so it was pretty easy to mash 'em together. Note that if you want more/fewer decimals you can change the value of the constant DUALFORMAT at the top accordingly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor