Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to switch everything in an assembly to metric

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
chan67
1263 Views, 6 Replies

How to switch everything in an assembly to metric

So I have a big assembly that is done in inches. 

I am now really fed up with it and want to change every single sub assembly and part file in it to mm and kg. 

How do I do that? I can change one part/sub assembly at a time from document settings, but I want to change everything at once. I have already set the default to mm and ISO but it didn't seem to make a difference. 

 

Thanks

6 REPLIES 6
Message 2 of 7
machiel.veldkamp
in reply to: chan67

If you want to do that all at once you might want to take a peak at iLogic.

The folks in Inventor customization might be able to help you start out 🙂

 

https://forums.autodesk.com/t5/inventor-customization/bd-p/120

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

___________________________
Message 3 of 7
WHolzwarth
in reply to: chan67

Message 4 of 7
Sergio.D.Suárez
in reply to: chan67

Hi, try to execute the following ilogic code at the main assembly level.
If it works, remove the asterisk in the line

'docFile.save
not what I removed before because if it does not work well, I would save the file with an error, for security I avoid saving the file in the codes until I am sure that they work as I want.

 

Dim oLengthUnits As String = 11269
Dim oMassUnits As String = 11283

Dim oDoc As Document= ThisDoc.Document
oDoc.UnitsOfMeasure.LengthUnits = oLengthUnits
oDoc.UnitsOfMeasure.MassUnits = oMassUnits

For Each docFile As Document In oDoc.AllReferencedDocuments	
	On Error Resume Next
	docFile.UnitsOfMeasure.LengthUnits = oLengthUnits
	docFile.UnitsOfMeasure.MassUnits = oMassUnits
	'docFile.Save
	docFile.Rebuild
Next




'---------LENGTH UNITS--------------
'kFootLengthUnits 11273 Foot Length
'kInchLengthUnits 11272 Inch Length
'kMillimeterLengthUnits 11269 Millimeter Length
'kCentimeterLengthUnits 11268 Centimeter Length
'kMeterLengthUnits 11270 Meter Length 
'kMicronLengthUnits 11271 Micron Length. 

'---------MASS UNITS---------------
'kLbMassMassUnits 11286 LbMass Mass
'kSlugMassUnits 11285 Slug Mass
'kGramMassUnits 11284 Gram Mass
'kKilogramMassUnits 11283 Kilogram Mass

 This rule will change the units of your assembly and all assembly reference files.
I hope this helps with your problem. Regards


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

Message 5 of 7
lena.talkhina
in reply to: chan67

Hello @chan67 !

Great to see you here on Inventor Forum.

Did you find a solution? Don't hesitate to click the green button below the post to accept the solution.

Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям! | Do you find the posts helpful? "LIKE" these posts!
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.



Лена Талхина/Lena Talkhina
Менеджер Сообщества - Русский/Community Manager - Russian

Message 6 of 7
chan67
in reply to: Sergio.D.Suárez

One part (only one as far as I can tell) got deleted for some unknown reason and it broke my assembly. Other than that it seems to work fine. Maybe some problem with the loop? 

(don't worry I backed everything up)

Message 7 of 7
WHolzwarth
in reply to: chan67

No one knows. Without seeing the files.

Walter Holzwarth

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report