How to change units without converting!
How to change units without converting!
(OP)
Is there a way to do this in solidworks? I know I can do it fine in PROe, but can't seem to find a way in SW. I've been searching around and can find nothing.
What I mean is, I have a part I designed in mm. Now, I would like to keep the numbers the same but change it to inches. For example,
2mm --> 2in
Can this be done??
What I mean is, I have a part I designed in mm. Now, I would like to keep the numbers the same but change it to inches. For example,
2mm --> 2in
Can this be done??






RE: How to change units without converting!
The quick answer is to change your units in Options and then scale by the conversion factor and it will work. But it's not the best way to do things since everything before the scale feature will be according to the pre-scaled dimensions.
The best way to do it I know of is to go through feature by feature and change your dimensions.
Jeff Mowry
www.industrialdesignhaus.com
A people governed by fear cannot value freedom.
RE: How to change units without converting!
thread559-249315: Simple Scaling Question
Chris
SolidWorks 09, CATIA V5
ctopher's home
SolidWorks Legion
RE: How to change units without converting!
RE: How to change units without converting!
Danjar, did you see what CorBlimeyLimey posted in the other thread about this? Looks like "ModelRescaler" at Lenny's page will do this for you.
Jeff Mowry
www.industrialdesignhaus.com
A people governed by fear cannot value freedom.
RE: How to change units without converting!
Really isn't all that difficult.
Click to record macro, then goto:
Options - Document Properties - Units
Change the properties to what you want, hit ok, then stop the macro recording. Save and test it. Should work.
James Spisich
Design Engineer, CSWP
RE: How to change units without converting!
RE: How to change units without converting!
If you must scale the entire part, you need to scale all linear dimensions. If you can not automate this, you may miss a dimension or two in the midst of the blinding tedium.
To avoid missing any dimensions, first export your model, import it to a new part file and scale that. Overlay the two parts in a temporary assembly. Now you have a model to compare to ensure you have fully converted all features in your part.
RE: How to change units without converting!
You could also try a macro using the: Dimension::GetValue3 call, then run a loop multiplying by your scale factor.
I'll post a quick try and doing that, give me a minute.
James Spisich
Design Engineer, CSWP
RE: How to change units without converting!
One thing to watch out for is that angular values like 360 or 90deg * or / 25.4 will cause rebuild failures. I typically name my angles as A# instead of D# so I can filter them out.
Once you have your design table make sure it contains all your configs. A good way to check thiis is to set design table properties to prompt for adding new dimensions features and configs. Then all you need to do is edit the table using Edit in Separate window option and save or copy the table information to another spreadsheet or temp file.
Go to Document Props by Right Clicking and selecting Doc Props from pop-up Change your Units. SolidWorks keeps the model at same size by converting to equivalent dimension values. Now when you edit your design table all you need to do is Paste in the original values that you saved out in the previous step.
Of course using the scale feature will work too but if you use model item dimensions in your drawings they will be way off. Using driven dimensions the scale method will probably be easier to do.
Of course the best option is to always check your UNITS prior to or even after your first feature so you won't have to convert later on down the Feature Road.
Michael
RE: How to change units without converting!
RE: How to change units without converting!
Modify Plane by Changing System Value Example (VB)
This example shows how to modify the offset distance of an offset plane by modifying the system value.
'--------------------------------------------
'
' Preconditions:
' (1) Model document is open.
' (2) An offset plane named Plane1 exists.
'
' Postconditions: The offset distance of Plane1 is halved.
'
'--------------------------------------------
Option Explicit
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swModelDocExt As SldWorks.ModelDocExtension
Dim swSelMgr As SldWorks.SelectionMgr
Dim swDim As SldWorks.Dimension
Dim dimValue As Variant
Dim boolstatus As Boolean
Dim longstatus As Long
Sub main()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swSelMgr = swModel.SelectionManager
Set swModelDocExt = swModel.Extension
boolstatus = swModelDocExt.SelectByID2("Plane1", "PLANE", 0, 0, 0, False, 0, Nothing, swSelectOptionDefault)
Set swDim = swModel.Parameter("D1@Plane1")
dimValue = swDim.GetSystemValue3(swThisConfiguration, Empty)
dimValue(0) = dimValue(0) / 2
longstatus = swDim.SetSystemValue3(dimValue(0), swSetValue_InThisConfiguration, Empty)
swModel.EditRebuild3
End Sub
--------------
Spend some time fidling with that, or just remodel them and make your templates more descriptive as to what units they're in so you don't do this again.
I'm sure you could automate it, you'd just need some time to get it to work properly.
James Spisich
Design Engineer, CSWP
RE: How to change units without converting!
RE: How to change units without converting!
Lenny strikes again. =)
James Spisich
Design Engineer, CSWP