Results 1 to 2 of 2

Thread: INVENTOR UNITS

  1. #1
    Member
    Join Date
    2009-02
    Location
    Louisville, KY
    Posts
    3
    Login to Give a bone
    0

    Default INVENTOR UNITS

    IS THERE A WAY TO CHANGE "UNIT OF MEASURE" IN INVENTOR 2010 FOR ALL PARTS OF AN ASSEMBLY?

  2. #2
    Active Member
    Join Date
    2008-02
    Location
    Central IL
    Posts
    53
    Login to Give a bone
    0

    Default Re: INVENTOR UNITS

    Here is a simple loop routine that will get you started:
    Code:
    Public Sub ChangeUnits()
    
        'Set a reference to the current inventor document.
        Dim InvDoc As Document
        Set InvDoc = ThisApplication.ActiveDocument
        
        Dim Refdoc As Document
        
        'Initialize error trapping
        On Error GoTo ERROR_QUIT
      
       'Set all referenced files unit of measure to Inches
        Dim oUOM As UnitsOfMeasure
        Dim eLengthUnits As UnitsTypeEnum
        
        'Loop thru all documents referenced by the active document
        For Each Refdoc In InvDoc.AllReferencedDocuments
            
            Set oUOM = Refdoc.UnitsOfMeasure
            eLengthUnits = oUOM.LengthUnits
            'Debug.Print oUOM.GetStringFromType(eLengthUnits)
            
            'Check to see the length unit type
            If oUOM.GetStringFromType(eLengthUnits) <> "inch" Then
                oUOM.LengthUnits = kInchLengthUnits
                
                'Inform the user that a part had its unit of measure changed
                MsgBox "Part " & Refdoc.DisplayName & " UnitsOfMeasure changed to Inches"
            End If
            
        Next
       
    ERROR_QUIT:
        Exit Sub
            
    End Sub

Similar Threads

  1. 2014: Revit Lookup Table Acceptable Units - Consolidated List? / Units for ##NUMBER?
    By DMagillIII in forum Revit MEP - Families
    Replies: 2
    Last Post: 2015-01-23, 08:55 PM
  2. Add Architectural Units to Inventor
    By inventor.wishlist1738 in forum Inventor Wish List
    Replies: 1
    Last Post: 2012-08-18, 01:31 PM
  3. INVENTOR - VBA units
    By clovis in forum VBA/COM Interop
    Replies: 3
    Last Post: 2012-07-16, 02:05 PM
  4. Replies: 4
    Last Post: 2007-12-10, 07:03 PM
  5. Convert Civil drawings using decimal units into Arch. units
    By tlarocco in forum AutoCAD Civil 3D - General
    Replies: 4
    Last Post: 2006-07-17, 05:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •