Results 1 to 4 of 4

Thread: INVENTOR - VBA units

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    I could stop if I wanted to
    Join Date
    2001-07
    Posts
    318
    Login to Give a bone
    0

    Default INVENTOR - VBA units

    Hello,
    I've just started some macro's with Inventor and came to a point where I can't find an answer.

    I'm putting some user parameters in the custom properties
    DIAMETER
    LENGTH
    ...

    The values I get in the custom properties are in cm and not in mm as they should.
    I've checked the document property which is in mm.
    the macro reads mm as unit but the value is cm.
    What do I do wrong?
    Thanks

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    5,850
    Login to Give a bone
    0

    Default Re: INVENTOR - VBA units

    You'll probably get more help if you post your code. We can't tell you what you did wrong if we don't know what you did.
    C:> ED WORKING....

  3. #3
    I could stop if I wanted to
    Join Date
    2001-07
    Posts
    318
    Login to Give a bone
    0

    Default Re: INVENTOR - VBA units

    Quote Originally Posted by clovis View Post
    Hello,
    ...
    the macro reads mm as unit but the value is cm.
    ...
    [Inventor uses cm as the default unit. All units are in cm. Need to convert from there.]

  4. #4
    Woo! Hoo! my 1st post
    Join Date
    2012-07
    Posts
    1
    Login to Give a bone
    0

    Default Re: INVENTOR - VBA units

    I've met the same problem.
    I'm still trying to find.
    Unfortunately,I only find another way instead to solve it.
    You can use the code as the following:
    Set oPartDoc = ThisApplication.ActiveDocument
    Set Upams=oPartDoc.Componentdefinition.Parameters.Userparameters
    and now put the "val(Upams.item("XXX").expression)" into the custom properties

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 UNITS
    By snicarry in forum VBA/COM Interop
    Replies: 1
    Last Post: 2009-12-18, 02:59 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
  •