×
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

How to change units without converting!

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??  

RE: How to change units without converting!

Did you ask this before in another forum?  I just answered this somewhere else a day ago.

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!

(OP)
Thank you, I guess there isn't a simple way to do it like in PROe lol. It's a simple part so I'll probably just remake it. I already tried just changing the dimensions, but it would require me to do a bunch of redrawing because it gets all screwed up lol.

RE: How to change units without converting!

That's perfect, Chris!  Now why couldn't I find that?  (Must have been a long week.)

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!

You can record a simple macro changing the document settings from inch -> mm, and mm -> inch.  When you want to change, just set a button for the macros and click the one you want.

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!

JSpisich misunderstands the question. The OP wants to do more than just change units.

RE: How to change units without converting!

I don't like adding a scale feture to fix the problem.  It seems like a scab fix to me, liable to cause issues later in the part's life cycle.  I wouldn't do it unless the model was simply way too big to manage.

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!

That I did.

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!

The best way to do this is to create an Automatic or blank design table and double click the dimension values to add them all to the table.

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
elk

RE: How to change units without converting!

Well I don't have any time to do this, but see:

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!

Gaaa!  I went to Lenny's website before posting because I was sure he had something, but I missed it!

RE: How to change units without converting!

Nm, looks like it's already done!

Lenny strikes again. =)

James Spisich
Design Engineer, CSWP

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